From 9fb98a42d0e1203b497fb0ee055f434c4d20b8c9 Mon Sep 17 00:00:00 2001 From: Quinton Hoole Date: Mon, 16 May 2016 11:06:03 -0700 Subject: [PATCH] Update vendor package google.golang.org/api/googleapi. --- Godeps/Godeps.json | 14 +- .../v2beta2/cloudmonitoring-api.json | 6 +- .../v2beta2/cloudmonitoring-gen.go | 183 +- .../api/compute/v1/compute-api.json | 1454 ++- .../api/compute/v1/compute-gen.go | 9197 ++++++++--------- .../api/container/v1/container-api.json | 453 +- .../api/container/v1/container-gen.go | 1102 +- .../api/gensupport/backoff.go | 46 + .../api/gensupport/buffer.go | 77 + .../google.golang.org/api/gensupport/media.go | 229 +- .../api/gensupport/params.go | 21 +- .../api/gensupport/resumable.go | 198 + .../google.golang.org/api/gensupport/retry.go | 77 + .../api/googleapi/googleapi.go | 233 +- .../internal/uritemplates/uritemplates.go | 247 +- .../googleapi/internal/uritemplates/utils.go | 14 +- 16 files changed, 7700 insertions(+), 5851 deletions(-) create mode 100644 vendor/google.golang.org/api/gensupport/backoff.go create mode 100644 vendor/google.golang.org/api/gensupport/buffer.go create mode 100644 vendor/google.golang.org/api/gensupport/resumable.go create mode 100644 vendor/google.golang.org/api/gensupport/retry.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 7c16e912b3c..9e9af127828 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/kubernetes", "GoVersion": "go1.6", - "GodepVersion": "v63", + "GodepVersion": "v67", "Packages": [ "github.com/ugorji/go/codec/codecgen", "github.com/onsi/ginkgo/ginkgo", @@ -2003,27 +2003,27 @@ }, { "ImportPath": "google.golang.org/api/cloudmonitoring/v2beta2", - "Rev": "77e7d383beb96054547729f49c372b3d01e196ff" + "Rev": "4300f6b0c8a7f09e521dd0af2cee27e28846e037" }, { "ImportPath": "google.golang.org/api/compute/v1", - "Rev": "77e7d383beb96054547729f49c372b3d01e196ff" + "Rev": "4300f6b0c8a7f09e521dd0af2cee27e28846e037" }, { "ImportPath": "google.golang.org/api/container/v1", - "Rev": "77e7d383beb96054547729f49c372b3d01e196ff" + "Rev": "4300f6b0c8a7f09e521dd0af2cee27e28846e037" }, { "ImportPath": "google.golang.org/api/gensupport", - "Rev": "77e7d383beb96054547729f49c372b3d01e196ff" + "Rev": "4300f6b0c8a7f09e521dd0af2cee27e28846e037" }, { "ImportPath": "google.golang.org/api/googleapi", - "Rev": "77e7d383beb96054547729f49c372b3d01e196ff" + "Rev": "4300f6b0c8a7f09e521dd0af2cee27e28846e037" }, { "ImportPath": "google.golang.org/api/googleapi/internal/uritemplates", - "Rev": "77e7d383beb96054547729f49c372b3d01e196ff" + "Rev": "4300f6b0c8a7f09e521dd0af2cee27e28846e037" }, { "ImportPath": "google.golang.org/cloud/compute/metadata", diff --git a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json index c6b2d23a741..44c428b877e 100644 --- a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json +++ b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json @@ -1,14 +1,14 @@ { "kind": "discovery#restDescription", - "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/avMl03W4ktR_Q7PS4O3ogtyT8Dc\"", + "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/A2G_NAa29vne9MPSojupRQ5bVuo\"", "discoveryVersion": "v1", "id": "cloudmonitoring:v2beta2", "name": "cloudmonitoring", "canonicalName": "Cloud Monitoring", "version": "v2beta2", - "revision": "20150713", + "revision": "20160314", "title": "Cloud Monitoring API", - "description": "API for accessing Google Cloud and API monitoring data.", + "description": "Accesses Google Cloud Monitoring data.", "ownerDomain": "google.com", "ownerName": "Google", "icons": { diff --git a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-gen.go b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-gen.go index 15b58b4ece5..30f1b6bef26 100644 --- a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-gen.go +++ b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-gen.go @@ -754,23 +754,6 @@ func (r *MetricDescriptorsService) Create(project string, metricdescriptor *Metr return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *MetricDescriptorsCreateCall) QuotaUser(quotaUser string) *MetricDescriptorsCreateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *MetricDescriptorsCreateCall) UserIP(userIP string) *MetricDescriptorsCreateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -816,7 +799,8 @@ func (c *MetricDescriptorsCreateCall) doRequest(alt string) (*http.Response, err // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *MetricDescriptorsCreateCall) Do() (*MetricDescriptor, error) { +func (c *MetricDescriptorsCreateCall) Do(opts ...googleapi.CallOption) (*MetricDescriptor, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -892,23 +876,6 @@ func (r *MetricDescriptorsService) Delete(project string, metric string) *Metric return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *MetricDescriptorsDeleteCall) QuotaUser(quotaUser string) *MetricDescriptorsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *MetricDescriptorsDeleteCall) UserIP(userIP string) *MetricDescriptorsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -949,7 +916,8 @@ func (c *MetricDescriptorsDeleteCall) doRequest(alt string) (*http.Response, err // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *MetricDescriptorsDeleteCall) Do() (*DeleteMetricDescriptorResponse, error) { +func (c *MetricDescriptorsDeleteCall) Do(opts ...googleapi.CallOption) (*DeleteMetricDescriptorResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -1062,23 +1030,6 @@ func (c *MetricDescriptorsListCall) Query(query string) *MetricDescriptorsListCa return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *MetricDescriptorsListCall) QuotaUser(quotaUser string) *MetricDescriptorsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *MetricDescriptorsListCall) UserIP(userIP string) *MetricDescriptorsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1131,7 +1082,8 @@ func (c *MetricDescriptorsListCall) doRequest(alt string) (*http.Response, error // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *MetricDescriptorsListCall) Do() (*ListMetricDescriptorsResponse, error) { +func (c *MetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMetricDescriptorsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -1208,6 +1160,27 @@ func (c *MetricDescriptorsListCall) Do() (*ListMetricDescriptorsResponse, error) } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *MetricDescriptorsListCall) Pages(ctx context.Context, f func(*ListMetricDescriptorsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "cloudmonitoring.timeseries.list": type TimeseriesListCall struct { @@ -1289,15 +1262,6 @@ func (c *TimeseriesListCall) PageToken(pageToken string) *TimeseriesListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TimeseriesListCall) QuotaUser(quotaUser string) *TimeseriesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Timespan sets the optional parameter "timespan": Length of the time // interval to query, which is an alternative way to declare the // interval: (youngest - timespan, youngest]. The timespan and oldest @@ -1316,14 +1280,6 @@ func (c *TimeseriesListCall) Timespan(timespan string) *TimeseriesListCall { return c } -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TimeseriesListCall) UserIP(userIP string) *TimeseriesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Window sets the optional parameter "window": The sampling window. At // most one data point will be returned for each window in the requested // time interval. This parameter is only valid for non-cumulative metric @@ -1391,7 +1347,8 @@ func (c *TimeseriesListCall) doRequest(alt string) (*http.Response, error) { // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *TimeseriesListCall) Do() (*ListTimeseriesResponse, error) { +func (c *TimeseriesListCall) Do(opts ...googleapi.CallOption) (*ListTimeseriesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -1518,6 +1475,27 @@ func (c *TimeseriesListCall) Do() (*ListTimeseriesResponse, error) { } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *TimeseriesListCall) Pages(ctx context.Context, f func(*ListTimeseriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "cloudmonitoring.timeseries.write": type TimeseriesWriteCall struct { @@ -1543,23 +1521,6 @@ func (r *TimeseriesService) Write(project string, writetimeseriesrequest *WriteT return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TimeseriesWriteCall) QuotaUser(quotaUser string) *TimeseriesWriteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TimeseriesWriteCall) UserIP(userIP string) *TimeseriesWriteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1605,7 +1566,8 @@ func (c *TimeseriesWriteCall) doRequest(alt string) (*http.Response, error) { // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *TimeseriesWriteCall) Do() (*WriteTimeseriesResponse, error) { +func (c *TimeseriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteTimeseriesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -1745,15 +1707,6 @@ func (c *TimeseriesDescriptorsListCall) PageToken(pageToken string) *TimeseriesD return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TimeseriesDescriptorsListCall) QuotaUser(quotaUser string) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Timespan sets the optional parameter "timespan": Length of the time // interval to query, which is an alternative way to declare the // interval: (youngest - timespan, youngest]. The timespan and oldest @@ -1772,14 +1725,6 @@ func (c *TimeseriesDescriptorsListCall) Timespan(timespan string) *TimeseriesDes return c } -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TimeseriesDescriptorsListCall) UserIP(userIP string) *TimeseriesDescriptorsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Window sets the optional parameter "window": The sampling window. At // most one data point will be returned for each window in the requested // time interval. This parameter is only valid for non-cumulative metric @@ -1848,7 +1793,8 @@ func (c *TimeseriesDescriptorsListCall) doRequest(alt string) (*http.Response, e // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *TimeseriesDescriptorsListCall) Do() (*ListTimeseriesDescriptorsResponse, error) { +func (c *TimeseriesDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListTimeseriesDescriptorsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -1974,3 +1920,24 @@ func (c *TimeseriesDescriptorsListCall) Do() (*ListTimeseriesDescriptorsResponse // } } + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *TimeseriesDescriptorsListCall) Pages(ctx context.Context, f func(*ListTimeseriesDescriptorsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json index 4638d4886d7..b9e0b1ac50c 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -1,13 +1,13 @@ { "kind": "discovery#restDescription", - "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/nyxAZHxFLt8oJVpLaKjE9TIYD_A\"", + "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/-kKJM_jdN_4N4POlnVybNFH0Kag\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20151208", + "revision": "20160426", "title": "Compute Engine API", - "description": "API for the Google Compute Engine service.", + "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", "ownerName": "Google", "icons": { @@ -151,7 +151,7 @@ }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. 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.", + "description": "Name of the resource. Provided by the client when the resource is created. 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.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -222,7 +222,7 @@ "AddressList": { "id": "AddressList", "type": "object", - "description": "Contains a list of address resources.", + "description": "Contains a list of addresses.", "properties": { "id": { "type": "string", @@ -230,7 +230,7 @@ }, "items": { "type": "array", - "description": "[Output Only] A list of Address resources.", + "description": "[Output Only] A list of addresses.", "items": { "$ref": "Address" } @@ -269,6 +269,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -298,6 +299,7 @@ "", "", "", + "", "" ] }, @@ -309,7 +311,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -354,7 +356,7 @@ }, "interface": { "type": "string", - "description": "Specifies the disk interface to use for attaching this disk, either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", + "description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.", "enum": [ "NVME", "SCSI" @@ -431,17 +433,18 @@ }, "sourceImage": { "type": "string", - "description": "A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:\n\nglobal/images/my-private-image \n\nOr you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:\n\nprojects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD \n\nwhere vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases." + "description": "The source image used to create this disk. If the source image is deleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family" } } }, "Autoscaler": { "id": "Autoscaler", "type": "object", + "description": "Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.", "properties": { "autoscalingPolicy": { "$ref": "AutoscalingPolicy", - "description": "Autoscaling configuration." + "description": "The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.\n\nIf none of these are specified, the default will be to autoscale based on cpuUtilization to 0.8 or 80%." }, "creationTimestamp": { "type": "string", @@ -458,7 +461,7 @@ }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.", "default": "compute#autoscaler" }, "name": { @@ -477,7 +480,7 @@ }, "target": { "type": "string", - "description": "URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler." + "description": "URL of the managed instance group that this autoscaler will scale." }, "zone": { "type": "string", @@ -498,12 +501,12 @@ "description": "A map of scoped autoscaler lists.", "additionalProperties": { "$ref": "AutoscalersScopedList", - "description": "Name of the scope containing this set of autoscalers." + "description": "[Output Only] Name of the scope containing this set of autoscalers." } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.", "default": "compute#autoscalerAggregatedList" }, "nextPageToken": { @@ -519,7 +522,7 @@ "AutoscalerList": { "id": "AutoscalerList", "type": "object", - "description": "Contains a list of persistent autoscaler resources.", + "description": "Contains a list of Autoscaler resources.", "properties": { "id": { "type": "string", @@ -534,7 +537,7 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.", "default": "compute#autoscalerList" }, "nextPageToken": { @@ -553,19 +556,20 @@ "properties": { "autoscalers": { "type": "array", - "description": "List of autoscalers contained in this scope.", + "description": "[Output Only] List of autoscalers contained in this scope.", "items": { "$ref": "Autoscaler" } }, "warning": { "type": "object", - "description": "Informational warning which replaces the list of autoscalers when the list is empty.", + "description": "[Output Only] Informational warning which replaces the list of autoscalers when the list is empty.", "properties": { "code": { "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -595,6 +599,7 @@ "", "", "", + "", "" ] }, @@ -606,7 +611,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -630,16 +635,16 @@ "properties": { "coolDownPeriodSec": { "type": "integer", - "description": "The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds.", + "description": "The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.\n\nVirtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.", "format": "int32" }, "cpuUtilization": { "$ref": "AutoscalingPolicyCpuUtilization", - "description": "TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy." + "description": "Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group." }, "customMetricUtilizations": { "type": "array", - "description": "Configuration parameters of autoscaling based on custom metric.", + "description": "Configuration parameters of autoscaling based on a custom metric.", "items": { "$ref": "AutoscalingPolicyCustomMetricUtilization" } @@ -650,12 +655,12 @@ }, "maxNumReplicas": { "type": "integer", - "description": "The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend.", + "description": "The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.", "format": "int32" }, "minNumReplicas": { "type": "integer", - "description": "The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas.", + "description": "The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.", "format": "int32" } } @@ -667,7 +672,7 @@ "properties": { "utilizationTarget": { "type": "number", - "description": "The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8.", + "description": "The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.8.\n\nIf the CPU level is below the target utilization, the autoscaler scales down 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.\n\nIf the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.", "format": "double" } } @@ -679,16 +684,16 @@ "properties": { "metric": { "type": "string", - "description": "Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count." + "description": "The identifier of the Cloud Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.\n\nFor example, the following is a valid metric:\ncompute.googleapis.com/instance/network/received_bytes_count\n\n\nThe following is not a valid metric because it does not increase or decrease based on usage:\ncompute.googleapis.com/instance/cpu/reserved_cores" }, "utilizationTarget": { "type": "number", - "description": "Target value of the metric which Autoscaler should maintain. Must be a positive value.", + "description": "Target value of the metric which autoscaler should maintain. Must be a positive value.", "format": "double" }, "utilizationTargetType": { "type": "string", - "description": "Defines type in which utilization_target is expressed.", + "description": "Defines how target utilization value is expressed for a Cloud Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.", "enum": [ "DELTA_PER_MINUTE", "DELTA_PER_SECOND", @@ -705,11 +710,11 @@ "AutoscalingPolicyLoadBalancingUtilization": { "id": "AutoscalingPolicyLoadBalancingUtilization", "type": "object", - "description": "Load balancing utilization policy.", + "description": "Configuration parameters of autoscaling based on load balancing.", "properties": { "utilizationTarget": { "type": "number", - "description": "Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7.", + "description": "Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.", "format": "double" } } @@ -721,7 +726,7 @@ "properties": { "balancingMode": { "type": "string", - "description": "Specifies the balancing mode for this backend. The default is UTILIZATION but available values are UTILIZATION and RATE.", + "description": "Specifies the balancing mode for this backend. For global HTTP(S) load balancing, the default is UTILIZATION. Valid values are UTILIZATION and RATE.", "enum": [ "RATE", "UTILIZATION" @@ -746,12 +751,12 @@ }, "maxRate": { "type": "integer", - "description": "The max RPS of the group. Can be used with either balancing mode, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.", + "description": "The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.", "format": "int32" }, "maxRatePerInstance": { "type": "number", - "description": "The max RPS that a single backed instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.", + "description": "The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.", "format": "float" }, "maxUtilization": { @@ -764,7 +769,7 @@ "BackendService": { "id": "BackendService", "type": "object", - "description": "A BackendService resource. This resource defines a group of backend virtual machines together with their serving capacity.", + "description": "A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.", "properties": { "backends": { "type": "array", @@ -810,15 +815,16 @@ }, "port": { "type": "integer", - "description": "Deprecated in favor of port name. The TCP port to connect on the backend. The default value is 80.", + "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.", "format": "int32" }, "portName": { "type": "string", - "description": "Name of backend port. The same name should appear in the resource views referenced by this service. Required." + "description": "Name of backend port. The same name should appear in the instance groups referenced by this service. Required." }, "protocol": { "type": "string", + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP and SSL.", "enum": [ "HTTP", "HTTPS" @@ -828,6 +834,10 @@ "" ] }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services." + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -957,14 +967,14 @@ }, "licenses": { "type": "array", - "description": "Any applicable publicly visible licenses.", + "description": "[Output Only] Any applicable publicly visible licenses.", "items": { "type": "string" } }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. 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.", + "description": "Name of the resource. Provided by the client when the resource is created. 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.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -987,11 +997,11 @@ }, "sourceImage": { "type": "string", - "description": "The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created.\n\nWhen creating a disk, you can provide a private (custom) image using the following input, and Compute Engine will use the corresponding image from your project. For example:\n\nglobal/images/my-private-image \n\nOr you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:\n\nprojects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD \n\nwhere vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases." + "description": "The source image used to create this disk. If the source image is deleted, this field will not be set.\n\nTo create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-8 to use the latest Debian 8 image:\n\nprojects/debian-cloud/global/images/family/debian-8 \n\nAlternatively, use a specific version of a public operating system image:\n\nprojects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD \n\nTo create a disk with a private image that you created, specify the image name in the following format:\n\nglobal/images/my-private-image \n\nYou can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:\n\nglobal/images/family/my-private-family" }, "sourceImageId": { "type": "string", - "description": "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." + "description": "[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." }, "sourceSnapshot": { "type": "string", @@ -1019,11 +1029,11 @@ }, "type": { "type": "string", - "description": "URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created." + "description": "URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk." }, "users": { "type": "array", - "description": "Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance", + "description": "[Output Only] Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance", "items": { "type": "string" } @@ -1102,7 +1112,7 @@ "properties": { "destinationZone": { "type": "string", - "description": "The URL of the destination zone to move the disk to. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" + "description": "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: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" }, "targetDisk": { "type": "string", @@ -1113,7 +1123,7 @@ "DiskType": { "id": "DiskType", "type": "object", - "description": "A disk type resource.", + "description": "A DiskType resource.", "properties": { "creationTimestamp": { "type": "string", @@ -1195,7 +1205,7 @@ "DiskTypeList": { "id": "DiskTypeList", "type": "object", - "description": "Contains a list of disk type resources.", + "description": "Contains a list of disk types.", "properties": { "id": { "type": "string", @@ -1242,6 +1252,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -1271,6 +1282,7 @@ "", "", "", + "", "" ] }, @@ -1282,7 +1294,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -1299,6 +1311,17 @@ } } }, + "DisksResizeRequest": { + "id": "DisksResizeRequest", + "type": "object", + "properties": { + "sizeGb": { + "type": "string", + "description": "The new size of the persistent disk, which is specified in GB.", + "format": "int64" + } + } + }, "DisksScopedList": { "id": "DisksScopedList", "type": "object", @@ -1318,6 +1341,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -1347,6 +1371,7 @@ "", "", "", + "", "" ] }, @@ -1358,7 +1383,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -1378,7 +1403,7 @@ "Firewall": { "id": "Firewall", "type": "object", - "description": "A Firewall resource.", + "description": "Represents a Firewall resource.", "properties": { "allowed": { "type": "array", @@ -1388,7 +1413,7 @@ "properties": { "IPProtocol": { "type": "string", - "description": "The IP protocol that is allowed for this rule. The protocol type is required when creating a firewall. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number." + "description": "The IP protocol that is allowed for this rule. 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, sctp), or the IP protocol number." }, "ports": { "type": "array", @@ -1431,7 +1456,7 @@ }, "network": { "type": "string", - "description": "URL of the network resource for this firewall rule. This field is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" + "description": "URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" }, "selfLink": { "type": "string", @@ -1463,7 +1488,7 @@ "FirewallList": { "id": "FirewallList", "type": "object", - "description": "Contains a list of Firewall resources.", + "description": "Contains a list of firewalls.", "properties": { "id": { "type": "string", @@ -1502,7 +1527,7 @@ }, "IPProtocol": { "type": "string", - "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH or SCTP.", + "description": "The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP.", "enum": [ "AH", "ESP", @@ -1555,7 +1580,7 @@ }, "target": { "type": "string", - "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy or TargetHttpsProxy resource." + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy or TargetHttpsProxy resource. The forwarded traffic must be of a type appropriate to the target object. For example, TargetHttpProxy requires HTTP traffic, and TargetHttpsProxy requires HTTPS traffic." } } }, @@ -1577,7 +1602,7 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#forwardingRuleAggregatedList for lists of forwarding rules.", "default": "compute#forwardingRuleAggregatedList" }, "nextPageToken": { @@ -1640,6 +1665,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -1669,6 +1695,7 @@ "", "", "", + "", "" ] }, @@ -1680,7 +1707,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -1700,6 +1727,7 @@ "HealthCheckReference": { "id": "HealthCheckReference", "type": "object", + "description": "A full or valid partial URL to a health check. For example, the following are valid URLs: \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", "properties": { "healthCheck": { "type": "string" @@ -1793,7 +1821,7 @@ }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#httpHealthCheck for HTTP health checks.", "default": "compute#httpHealthCheck" }, "name": { @@ -1808,7 +1836,7 @@ }, "requestPath": { "type": "string", - "description": "The request path of the HTTP health check request. The default value is \"/\"." + "description": "The request path of the HTTP health check request. The default value is /." }, "selfLink": { "type": "string", @@ -1982,6 +2010,10 @@ "description": "Size of the image when restored onto a persistent disk (in GB).", "format": "int64" }, + "family": { + "type": "string", + "description": "The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated." + }, "id": { "type": "string", "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", @@ -2081,7 +2113,7 @@ "ImageList": { "id": "ImageList", "type": "object", - "description": "Contains a list of Image resources.", + "description": "Contains a list of images.", "properties": { "id": { "type": "string", @@ -2128,7 +2160,7 @@ }, "description": { "type": "string", - "description": "An optional textual description of the resource; provided by the client when the resource is created." + "description": "An optional description of this resource. Provide this property when you create the resource." }, "disks": { "type": "array", @@ -2139,7 +2171,7 @@ }, "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. This identifier is defined by the server.", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64" }, "kind": { @@ -2149,7 +2181,7 @@ }, "machineType": { "type": "string", - "description": "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:\n\nzones/us-central1-f/machineTypes/n1-standard-1 \n\nTo create a custom 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):\n\nzones/zone/machineTypes/custom-CPUS-MEMORY \n\nFor example: zones/us-central1-f/machineTypes/custom-4-5120 \n\nFor a full list of restrictions, read the Specifications for custom machine types.", + "description": "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:\n\nzones/us-central1-f/machineTypes/n1-standard-1 \n\nTo create a custom 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):\n\nzones/zone/machineTypes/custom-CPUS-MEMORY \n\nFor example: zones/us-central1-f/machineTypes/custom-4-5120 \n\nFor a full list of restrictions, read the Specifications for custom machine types.", "annotations": { "required": [ "compute.instances.insert" @@ -2162,7 +2194,7 @@ }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. 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." + "description": "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 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." }, "networkInterfaces": { "type": "array", @@ -2177,7 +2209,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] Server defined URL for this resource." + "description": "[Output Only] Server-defined URL for this resource." }, "serviceAccounts": { "type": "array", @@ -2216,7 +2248,7 @@ }, "tags": { "$ref": "Tags", - "description": "A list of tags to appy 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 with RFC1035." + "description": "A list of 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 with RFC1035." }, "zone": { "type": "string", @@ -2237,7 +2269,7 @@ "description": "[Output Only] A map of scoped instance lists.", "additionalProperties": { "$ref": "InstancesScopedList", - "description": "Name of the scope containing this set of instances." + "description": "[Output Only] Name of the scope containing this set of instances." } }, "kind": { @@ -2247,11 +2279,11 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[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." }, "selfLink": { "type": "string", - "description": "[Output Only] Server defined URL for this resource." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -2301,7 +2333,7 @@ }, "network": { "type": "string", - "description": "[Output Only] The URL of the network to which all instances in the instance group belong." + "description": "The URL of the network to which all instances in the instance group belong." }, "selfLink": { "type": "string", @@ -2312,6 +2344,10 @@ "description": "[Output Only] The total number of instances in the instance group.", "format": "int32" }, + "subnetwork": { + "type": "string", + "description": "The URL of the subnetwork to which all instances in the instance group belong." + }, "zone": { "type": "string", "description": "[Output Only] The URL of the zone where the instance group is located." @@ -2383,7 +2419,6 @@ "InstanceGroupManager": { "id": "InstanceGroupManager", "type": "object", - "description": "InstanceGroupManagers\n\nNext available tag: 20", "properties": { "baseInstanceName": { "type": "string", @@ -2409,7 +2444,7 @@ }, "fingerprint": { "type": "string", - "description": "[Output Only] The fingerprint of the target pools information. You can use this optional field for optimistic locking when you update the target pool entries.", + "description": "[Output Only] The fingerprint of the resource data. You can use this optional field for optimistic locking when you update the resource.", "format": "byte" }, "id": { @@ -2423,12 +2458,7 @@ }, "instanceTemplate": { "type": "string", - "description": "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.", - "annotations": { - "required": [ - "compute.instanceGroupManagers.insert" - ] - } + "description": "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." }, "kind": { "type": "string", @@ -2490,7 +2520,7 @@ }, "creating": { "type": "integer", - "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created.", + "description": "[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 one of these instances, it tries again until it creates the instance successfully.", "format": "int32" }, "deleting": { @@ -2653,6 +2683,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -2682,6 +2713,7 @@ "", "", "", + "", "" ] }, @@ -2693,7 +2725,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -2831,6 +2863,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -2860,6 +2893,7 @@ "", "", "", + "", "" ] }, @@ -2871,7 +2905,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -2909,7 +2943,7 @@ "InstanceList": { "id": "InstanceList", "type": "object", - "description": "Contains a list of instance resources.", + "description": "Contains a list of instances.", "properties": { "id": { "type": "string", @@ -2917,7 +2951,7 @@ }, "items": { "type": "array", - "description": "[Output Only] A list of Instance resources.", + "description": "[Output Only] A list of instances.", "items": { "$ref": "Instance" } @@ -2929,11 +2963,11 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[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." }, "selfLink": { "type": "string", - "description": "[Output Only] Server defined URL for this resource." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -2943,7 +2977,7 @@ "properties": { "destinationZone": { "type": "string", - "description": "The URL of the destination zone to move the instance to. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" + "description": "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: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" }, "targetInstance": { "type": "string", @@ -3152,6 +3186,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -3181,6 +3216,7 @@ "", "", "", + "", "" ] }, @@ -3192,7 +3228,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -3209,6 +3245,16 @@ } } }, + "InstancesSetMachineTypeRequest": { + "id": "InstancesSetMachineTypeRequest", + "type": "object", + "properties": { + "machineType": { + "type": "string", + "description": "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" + } + } + }, "License": { "id": "License", "type": "object", @@ -3354,7 +3400,7 @@ "MachineTypeList": { "id": "MachineTypeList", "type": "object", - "description": "Contains a list of Machine Type resources.", + "description": "Contains a list of machine types.", "properties": { "id": { "type": "string", @@ -3401,6 +3447,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -3430,6 +3477,7 @@ "", "", "", + "", "" ] }, @@ -3441,7 +3489,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -3464,7 +3512,7 @@ "properties": { "currentAction": { "type": "string", - "description": "[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: \n- NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. \n- CREATING The managed instance group is creating this instance. \n- RECREATING The managed instance group is recreating this instance. \n- DELETING The managed instance group is permanently deleting this instance. \n- 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. \n- RESTARTING The managed instance group is restarting the instance. \n- 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.", + "description": "[Output Only] The current action that the managed instance group has scheduled for the instance. Possible values: \n- NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance. \n- 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. \n- 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 target_size value is decreased. \n- RECREATING The managed instance group is recreating this instance. \n- DELETING The managed instance group is permanently deleting this instance. \n- 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. \n- RESTARTING The managed instance group is restarting the instance. \n- 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.", "enum": [ "ABANDONING", "CREATING", @@ -3543,7 +3591,7 @@ }, "location": { "type": "string", - "description": "[Output Only] Indicates the field in the request which caused the error. This property is optional." + "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." }, "message": { "type": "string", @@ -3622,13 +3670,17 @@ "Network": { "id": "Network", "type": "object", - "description": "A network resource.", + "description": "Represents a Network resource. Read Networks and Firewalls for more information.", "properties": { "IPv4Range": { "type": "string", "description": "The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}" }, + "autoCreateSubnetworks": { + "type": "boolean", + "description": "When set to true, the network is created in \"auto subnet mode\". When set to false, the network is in \"custom subnet mode\".\n\nIn \"auto subnet mode\", a newly created network is assigned the default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork per region." + }, "creationTimestamp": { "type": "string", "description": "[Output Only] Creation timestamp in RFC3339 text format." @@ -3665,6 +3717,13 @@ "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." + }, + "subnetworks": { + "type": "array", + "description": "[Output Only] Server-defined fully-qualified URLs for all subnetworks in this network.", + "items": { + "type": "string" + } } } }, @@ -3695,14 +3754,18 @@ }, "networkIP": { "type": "string", - "description": "[Output Only] An optional IPV4 internal network address assigned to the instance for this network interface." + "description": "An IPV4 internal network address to assign to the instance for this network interface. If not specified by user an unused internal IP is assigned by system." + }, + "subnetwork": { + "type": "string", + "description": "The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork \n- regions/region/subnetworks/subnetwork" } } }, "NetworkList": { "id": "NetworkList", "type": "object", - "description": "Contains a list of Network resources.", + "description": "Contains a list of networks.", "properties": { "id": { "type": "string", @@ -3737,7 +3800,7 @@ "properties": { "clientOperationId": { "type": "string", - "description": "[Output Only] A unique client ID generated by the server." + "description": "[Output Only] Reserved for future use." }, "creationTimestamp": { "type": "string", @@ -3767,7 +3830,7 @@ }, "location": { "type": "string", - "description": "[Output Only] Indicates the field in the request which caused the error. This property is optional." + "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional." }, "message": { "type": "string", @@ -3784,7 +3847,7 @@ }, "httpErrorStatusCode": { "type": "integer", - "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned. For example, a 404 means the resource was not found.", + "description": "[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.", "format": "int32" }, "id": { @@ -3807,16 +3870,16 @@ }, "operationType": { "type": "string", - "description": "[Output Only] The type of operation, which can be insert, update, or delete." + "description": "[Output Only] The type of operation, such as insert, update, or delete, and so on." }, "progress": { "type": "integer", - "description": "[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 at when the operation will be complete. This number should monotonically increase as the operation progresses.", + "description": "[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.", "format": "int32" }, "region": { "type": "string", - "description": "[Output Only] URL of the region where the operation resides. Only applicable for regional resources." + "description": "[Output Only] The URL of the region where the operation resides. Only available when performing regional operations." }, "selfLink": { "type": "string", @@ -3851,7 +3914,7 @@ }, "targetLink": { "type": "string", - "description": "[Output Only] The URL of the resource that the operation is modifying." + "description": "[Output Only] The URL of the resource that the operation modifies." }, "user": { "type": "string", @@ -3867,6 +3930,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -3896,6 +3960,7 @@ "", "", "", + "", "" ] }, @@ -3907,7 +3972,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -3925,7 +3990,7 @@ }, "zone": { "type": "string", - "description": "[Output Only] URL of the zone where the operation resides." + "description": "[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations." } } }, @@ -3971,7 +4036,7 @@ }, "items": { "type": "array", - "description": "[Output Only] The Operation resources.", + "description": "[Output Only] A list of Operation resources.", "items": { "$ref": "Operation" } @@ -4010,6 +4075,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -4039,6 +4105,7 @@ "", "", "", + "", "" ] }, @@ -4050,7 +4117,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -4074,7 +4141,7 @@ "properties": { "defaultService": { "type": "string", - "description": "The URL to the BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is met by the URL's path portion." + "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService" }, "description": { "type": "string", @@ -4114,7 +4181,7 @@ "Project": { "id": "Project", "type": "object", - "description": "A Project resource. Projects can only be created in the Google Developers Console. Unless marked otherwise, values can only be modified in the console.", + "description": "A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console.", "properties": { "commonInstanceMetadata": { "$ref": "Metadata", @@ -4162,7 +4229,7 @@ }, "usageExportLocation": { "$ref": "UsageExportLocation", - "description": "The location in Cloud Storage and naming method of the daily usage report." + "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." } } }, @@ -4180,6 +4247,7 @@ "type": "string", "description": "[Output Only] Name of the quota metric.", "enum": [ + "AUTOSCALERS", "BACKEND_SERVICES", "CPUS", "DISKS_TOTAL_GB", @@ -4199,6 +4267,7 @@ "SSD_TOTAL_GB", "SSL_CERTIFICATES", "STATIC_ADDRESSES", + "SUBNETWORKS", "TARGET_HTTPS_PROXIES", "TARGET_HTTP_PROXIES", "TARGET_INSTANCES", @@ -4233,6 +4302,8 @@ "", "", "", + "", + "", "" ] }, @@ -4350,7 +4421,7 @@ "Route": { "id": "Route", "type": "object", - "description": "The route resource. A Route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with instances by tag and the set of Routes for a particular instance is called its routing table. For each packet leaving a instance, the system searches that instance's routing table for a single best matching Route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the Route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching Routes. The packet is then forwarded as specified by the nextHop field of the winning Route -- either to another instance destination, a instance gateway or a Google Compute Engien-operated gateway. Packets that do not match any Route in the sending instance's routing table are dropped.", + "description": "Represents a Route resource. A route specifies how certain packets should be handled by the network. Routes are associated with instances by tags and the set of routes for a particular instance is called its routing table.\n\nFor each packet leaving a instance, the system searches that instance's routing table for a single best matching route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the nextHop field of the winning route - either to another instance destination, a instance gateway or a Google Compute Engine-operated gateway.\n\nPackets that do not match any route in the sending instance's routing table are dropped.", "properties": { "creationTimestamp": { "type": "string", @@ -4381,7 +4452,7 @@ }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. 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.", + "description": "Name of the resource. Provided by the client when the resource is created. 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.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -4400,11 +4471,11 @@ }, "nextHopGateway": { "type": "string", - "description": "The URL to a gateway that should handle matching packets. Currently, this is only the internet gateway: projects/\u003cproject-id\u003e/global/gateways/default-internet-gateway" + "description": "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/\u003cproject-id\u003e/global/gateways/default-internet-gateway" }, "nextHopInstance": { "type": "string", - "description": "The fully-qualified URL to an instance that should handle matching packets. For example:\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/" + "description": "The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example:\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/" }, "nextHopIp": { "type": "string", @@ -4420,7 +4491,7 @@ }, "priority": { "type": "integer", - "description": "Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values. Default value is 1000. A valid range is between 0 and 65535.", + "description": "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 the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535.", "format": "uint32", "annotations": { "required": [ @@ -4454,6 +4525,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -4483,6 +4555,7 @@ "", "", "", + "", "" ] }, @@ -4494,7 +4567,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -4515,7 +4588,7 @@ "RouteList": { "id": "RouteList", "type": "object", - "description": "Contains a list of route resources.", + "description": "Contains a list of Route resources.", "properties": { "id": { "type": "string", @@ -4523,7 +4596,7 @@ }, "items": { "type": "array", - "description": "A list of Route resources.", + "description": "[Output Only] A list of Route resources.", "items": { "$ref": "Route" } @@ -4554,7 +4627,7 @@ }, "onHostMaintenance": { "type": "string", - "description": "Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting maintenance behavior.", + "description": "Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.", "enum": [ "MIGRATE", "TERMINATE" @@ -4586,7 +4659,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] Server defined URL for the resource." + "description": "[Output Only] Server-defined URL for the resource." } } }, @@ -4638,7 +4711,7 @@ }, "licenses": { "type": "array", - "description": "Public visible licenses.", + "description": "[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).", "items": { "type": "string" } @@ -4654,7 +4727,7 @@ }, "sourceDisk": { "type": "string", - "description": "The source disk used to create this snapshot." + "description": "[Output Only] The source disk used to create this snapshot." }, "sourceDiskId": { "type": "string", @@ -4662,7 +4735,7 @@ }, "status": { "type": "string", - "description": "[Output Only] The status of the snapshot.", + "description": "[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.", "enum": [ "CREATING", "DELETING", @@ -4685,7 +4758,7 @@ }, "storageBytesStatus": { "type": "string", - "description": "[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation.", + "description": "[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.", "enum": [ "UPDATING", "UP_TO_DATE" @@ -4708,7 +4781,7 @@ }, "items": { "type": "array", - "description": "A list of Snapshot resources.", + "description": "[Output Only] A list of Snapshot resources.", "items": { "$ref": "Snapshot" } @@ -4731,7 +4804,7 @@ "SslCertificate": { "id": "SslCertificate", "type": "object", - "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to global HTTPS loadbalancer to serve secure connections.", + "description": "An SslCertificate resource. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.", "properties": { "certificate": { "type": "string", @@ -4801,6 +4874,196 @@ } } }, + "Subnetwork": { + "id": "Subnetwork", + "type": "object", + "description": "A Subnetwork resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "gatewayAddress": { + "type": "string", + "description": "[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "ipCidrRange": { + "type": "string", + "description": "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 192.168.0.0/16. Ranges must be unique and non-overlapping within a network." + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", + "default": "compute#subnetwork" + }, + "name": { + "type": "string", + "description": "The name of the resource, provided by the client when initially creating 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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "network": { + "type": "string", + "description": "The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. Only networks that are in the distributed mode can have subnetworks." + }, + "region": { + "type": "string", + "description": "URL of the region where the Subnetwork resides." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "SubnetworkAggregatedList": { + "id": "SubnetworkAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "object", + "description": "[Output] A map of scoped Subnetwork lists.", + "additionalProperties": { + "$ref": "SubnetworksScopedList", + "description": "Name of the scope containing this set of Subnetworks." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#subnetworkAggregatedList for aggregated lists of subnetworks.", + "default": "compute#subnetworkAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "SubnetworkList": { + "id": "SubnetworkList", + "type": "object", + "description": "Contains a list of Subnetwork resources.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + }, + "items": { + "type": "array", + "description": "The Subnetwork resources.", + "items": { + "$ref": "Subnetwork" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#subnetworkList for lists of subnetworks.", + "default": "compute#subnetworkList" + }, + "nextPageToken": { + "type": "string", + "description": "[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." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "SubnetworksScopedList": { + "id": "SubnetworksScopedList", + "type": "object", + "properties": { + "subnetworks": { + "type": "array", + "description": "List of subnetworks contained in this scope.", + "items": { + "$ref": "Subnetwork" + } + }, + "warning": { + "type": "object", + "description": "An informational warning that appears when the list of addresses is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, "Tags": { "id": "Tags", "type": "object", @@ -4845,7 +5108,7 @@ }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. 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.", + "description": "Name of the resource. Provided by the client when the resource is created. 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.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" }, "selfLink": { @@ -4876,7 +5139,7 @@ }, "kind": { "type": "string", - "description": "Type of resource. Always compute#targetHttpProxyList for lists of Target HTTP proxies.", + "description": "Type of resource. Always compute#targetHttpProxyList for lists of target HTTP proxies.", "default": "compute#targetHttpProxyList" }, "nextPageToken": { @@ -4895,7 +5158,7 @@ "properties": { "sslCertificates": { "type": "array", - "description": "New set of URLs to SslCertificate resources to associate with this TargetHttpProxy. Currently exactly one ssl certificate must be specified.", + "description": "New set of SslCertificate resources to associate with this TargetHttpsProxy resource. Currently exactly one SslCertificate resource must be specified.", "items": { "type": "string" } @@ -4922,7 +5185,7 @@ }, "kind": { "type": "string", - "description": "[Output Only] Type of the resource. Always compute#targetHttpsProxy for target HTTPS proxies.", + "description": "[Output Only] Type of resource. Always compute#targetHttpsProxy for target HTTPS proxies.", "default": "compute#targetHttpsProxy" }, "name": { @@ -4936,14 +5199,14 @@ }, "sslCertificates": { "type": "array", - "description": "URLs to SslCertificate resources that are used to authenticate connections to Backends. Currently exactly one SSL certificate must be specified.", + "description": "URLs to SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified.", "items": { "type": "string" } }, "urlMap": { "type": "string", - "description": "URL to the UrlMap resource that defines the mapping from URL to the BackendService." + "description": "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: \n- https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map \n- projects/project/global/urlMaps/url-map \n- global/urlMaps/url-map" } } }, @@ -4965,7 +5228,7 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "Type of resource. Always compute#targetHttpsProxyList for lists of target HTTPS proxies.", "default": "compute#targetHttpsProxyList" }, "nextPageToken": { @@ -4998,7 +5261,7 @@ }, "instance": { "type": "string", - "description": "The URL to the instance that terminates the relevant traffic." + "description": "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: \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" }, "kind": { "type": "string", @@ -5111,6 +5374,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -5140,6 +5404,7 @@ "", "", "", + "", "" ] }, @@ -5151,7 +5416,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -5171,7 +5436,7 @@ "TargetPool": { "id": "TargetPool", "type": "object", - "description": "A TargetPool resource. This resource defines a pool of instances, associated HttpHealthCheck resources, and the fallback TargetPool.", + "description": "A TargetPool resource. This resource defines a pool of instances, associated HttpHealthCheck resources, and the fallback target pool.", "properties": { "backupPool": { "type": "string", @@ -5204,7 +5469,7 @@ }, "instances": { "type": "array", - "description": "A list of resource URLs to the member virtual machines serving this pool. They must live in zones contained in the same region as this pool.", + "description": "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.", "items": { "type": "string" } @@ -5253,7 +5518,7 @@ }, "items": { "type": "object", - "description": "A map of scoped target pool lists.", + "description": "[Output Only] A map of scoped target pool lists.", "additionalProperties": { "$ref": "TargetPoolsScopedList", "description": "Name of the scope containing this set of target pools." @@ -5261,7 +5526,7 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#targetPoolAggregatedList for aggregated lists of target pools.", "default": "compute#targetPoolAggregatedList" }, "nextPageToken": { @@ -5286,7 +5551,7 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#targetPoolInstanceHealth when checking the health of an instance.", "default": "compute#targetPoolInstanceHealth" } } @@ -5309,7 +5574,7 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#targetPoolList for lists of target pools.", "default": "compute#targetPoolList" }, "nextPageToken": { @@ -5328,7 +5593,7 @@ "properties": { "healthChecks": { "type": "array", - "description": "Health check URLs to be added to targetPool.", + "description": "A list of HttpHealthCheck resources to add to the target pool.", "items": { "$ref": "HealthCheckReference" } @@ -5341,7 +5606,7 @@ "properties": { "instances": { "type": "array", - "description": "URLs of the instances to be added to targetPool.", + "description": "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: \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" } @@ -5354,7 +5619,7 @@ "properties": { "healthChecks": { "type": "array", - "description": "Health check URLs to be removed from targetPool.", + "description": "Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs: \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" } @@ -5367,7 +5632,7 @@ "properties": { "instances": { "type": "array", - "description": "URLs of the instances to be removed from targetPool.", + "description": "URLs of the instances to be removed from target pool.", "items": { "$ref": "InstanceReference" } @@ -5393,6 +5658,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -5422,6 +5688,7 @@ "", "", "", + "", "" ] }, @@ -5433,7 +5700,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -5462,6 +5729,7 @@ "TargetVpnGateway": { "id": "TargetVpnGateway", "type": "object", + "description": "Represents a Target VPN gateway resource.", "properties": { "creationTimestamp": { "type": "string", @@ -5490,7 +5758,7 @@ }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. 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.", + "description": "Name of the resource. Provided by the client when the resource is created. 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.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -5533,7 +5801,7 @@ }, "tunnels": { "type": "array", - "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert and associated to a VPN gateway.", + "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert method and associated to a VPN gateway.", "items": { "type": "string" } @@ -5553,7 +5821,7 @@ "description": "A map of scoped target vpn gateway lists.", "additionalProperties": { "$ref": "TargetVpnGatewaysScopedList", - "description": "[Output Only] Name of the scope containing this set of target vpn gateways." + "description": "[Output Only] Name of the scope containing this set of target VPN gateways." } }, "kind": { @@ -5621,6 +5889,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -5650,6 +5919,7 @@ "", "", "", + "", "" ] }, @@ -5661,7 +5931,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -5753,7 +6023,7 @@ }, "tests": { "type": "array", - "description": "The list of expected URL mappings. Request to update this UrlMap will succeed only all of the test cases pass.", + "description": "The list of expected URL mappings. Request to update this UrlMap will succeed only if all of the test cases pass.", "items": { "$ref": "UrlMapTest" } @@ -5876,7 +6146,7 @@ "properties": { "bucketName": { "type": "string", - "description": "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 is just the bucket name, with no gs:// or https://storage.googleapis.com/ in front of it." + "description": "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 as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket." }, "reportNamePrefix": { "type": "string", @@ -5915,9 +6185,16 @@ "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", "default": "compute#vpnTunnel" }, + "localTrafficSelector": { + "type": "array", + "description": "Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "items": { + "type": "string" + } + }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. 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.", + "description": "Name of the resource. Provided by the client when the resource is created. 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.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -5939,7 +6216,7 @@ }, "sharedSecret": { "type": "string", - "description": "Shared secret used to set the secure session between the GCE VPN gateway and the peer VPN gateway." + "description": "Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway." }, "sharedSecretHash": { "type": "string", @@ -5949,6 +6226,7 @@ "type": "string", "description": "[Output Only] The status of the VPN tunnel.", "enum": [ + "ALLOCATING_RESOURCES", "AUTHORIZATION_ERROR", "DEPROVISIONING", "ESTABLISHED", @@ -5972,12 +6250,13 @@ "", "", "", + "", "" ] }, "targetVpnGateway": { "type": "string", - "description": "URL of the VPN gateway to which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", + "description": "URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", "annotations": { "required": [ "compute.vpnTunnels.insert" @@ -6067,6 +6346,7 @@ "type": "string", "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", "enum": [ + "CLEANUP_FAILED", "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", "INJECTED_KERNELS_DEPRECATED", @@ -6096,6 +6376,7 @@ "", "", "", + "", "" ] }, @@ -6107,7 +6388,7 @@ "properties": { "key": { "type": "string", - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource, and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." }, "value": { "type": "string", @@ -6151,31 +6432,6 @@ "description": "[Output Only] Type of the resource. Always compute#zone for zones.", "default": "compute#zone" }, - "maintenanceWindows": { - "type": "array", - "description": "[Output Only] Any scheduled maintenance windows for this zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable. For more information, see Maintenance Windows", - "items": { - "type": "object", - "properties": { - "beginTime": { - "type": "string", - "description": "[Output Only] Starting time of the maintenance window, in RFC3339 format." - }, - "description": { - "type": "string", - "description": "[Output Only] Textual description of the maintenance window." - }, - "endTime": { - "type": "string", - "description": "[Output Only] Ending time of the maintenance window, in RFC3339 format." - }, - "name": { - "type": "string", - "description": "[Output Only] Name of the maintenance window." - } - } - } - }, "name": { "type": "string", "description": "[Output Only] Name of the resource." @@ -6241,16 +6497,16 @@ "id": "compute.addresses.aggregatedList", "path": "{project}/aggregated/addresses", "httpMethod": "GET", - "description": "Retrieves the list of addresses grouped by scope.", + "description": "Retrieves an aggregated list of addresses.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -6304,7 +6560,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6345,7 +6601,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6380,7 +6636,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6405,16 +6661,16 @@ "id": "compute.addresses.list", "path": "{project}/regions/{region}/addresses", "httpMethod": "GET", - "description": "Retrieves the list of address resources contained within the specified region.", + "description": "Retrieves a list of addresses contained within the specified region.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -6435,7 +6691,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6462,16 +6718,16 @@ "id": "compute.autoscalers.aggregatedList", "path": "{project}/aggregated/autoscalers", "httpMethod": "GET", - "description": "Retrieves the list of autoscalers grouped by scope.", + "description": "Retrieves an aggregated list of autoscalers.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -6507,11 +6763,11 @@ "id": "compute.autoscalers.delete", "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", "httpMethod": "DELETE", - "description": "Deletes the specified autoscaler resource.", + "description": "Deletes the specified autoscaler.", "parameters": { "autoscaler": { "type": "string", - "description": "Name of the persistent autoscaler resource to delete.", + "description": "Name of the autoscaler to delete.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6525,7 +6781,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6548,11 +6804,11 @@ "id": "compute.autoscalers.get", "path": "{project}/zones/{zone}/autoscalers/{autoscaler}", "httpMethod": "GET", - "description": "Returns the specified autoscaler resource.", + "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", "parameters": { "autoscaler": { "type": "string", - "description": "Name of the persistent autoscaler resource to return.", + "description": "Name of the autoscaler to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6566,7 +6822,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6590,7 +6846,7 @@ "id": "compute.autoscalers.insert", "path": "{project}/zones/{zone}/autoscalers", "httpMethod": "POST", - "description": "Creates an autoscaler resource in the specified project using the data included in the request.", + "description": "Creates an autoscaler in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -6601,7 +6857,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6626,16 +6882,16 @@ "id": "compute.autoscalers.list", "path": "{project}/zones/{zone}/autoscalers", "httpMethod": "GET", - "description": "Retrieves the list of autoscaler resources contained within the specified zone.", + "description": "Retrieves a list of autoscalers contained within the specified zone.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -6656,7 +6912,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6679,11 +6935,11 @@ "id": "compute.autoscalers.patch", "path": "{project}/zones/{zone}/autoscalers", "httpMethod": "PATCH", - "description": "Updates an autoscaler resource in the specified project using the data included in the request. This method supports patch semantics.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.", "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler resource to update.", + "description": "Name of the autoscaler to update.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" @@ -6697,7 +6953,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6723,11 +6979,11 @@ "id": "compute.autoscalers.update", "path": "{project}/zones/{zone}/autoscalers", "httpMethod": "PUT", - "description": "Updates an autoscaler resource in the specified project using the data included in the request.", + "description": "Updates an autoscaler in the specified project using the data included in the request.", "parameters": { "autoscaler": { "type": "string", - "description": "Name of the autoscaler resource to update.", + "description": "Name of the autoscaler to update.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "query" }, @@ -6740,7 +6996,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6802,7 +7058,7 @@ "id": "compute.backendServices.get", "path": "{project}/global/backendServices/{backendService}", "httpMethod": "GET", - "description": "Returns the specified BackendService resource.", + "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", "parameters": { "backendService": { "type": "string", @@ -6872,7 +7128,7 @@ "id": "compute.backendServices.insert", "path": "{project}/global/backendServices", "httpMethod": "POST", - "description": "Creates a BackendService resource in the specified project using the data included in the request.", + "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", "parameters": { "project": { "type": "string", @@ -6904,12 +7160,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -6945,7 +7201,7 @@ "id": "compute.backendServices.patch", "path": "{project}/global/backendServices/{backendService}", "httpMethod": "PATCH", - "description": "Update the entire content of the BackendService resource. This method supports patch semantics.", + "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", "parameters": { "backendService": { "type": "string", @@ -6981,7 +7237,7 @@ "id": "compute.backendServices.update", "path": "{project}/global/backendServices/{backendService}", "httpMethod": "PUT", - "description": "Update the entire content of the BackendService resource.", + "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", "parameters": { "backendService": { "type": "string", @@ -7021,16 +7277,16 @@ "id": "compute.diskTypes.aggregatedList", "path": "{project}/aggregated/diskTypes", "httpMethod": "GET", - "description": "Retrieves the list of disk type resources grouped by scope.", + "description": "Retrieves an aggregated list of disk types.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -7066,11 +7322,11 @@ "id": "compute.diskTypes.get", "path": "{project}/zones/{zone}/diskTypes/{diskType}", "httpMethod": "GET", - "description": "Returns the specified disk type resource.", + "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", "parameters": { "diskType": { "type": "string", - "description": "Name of the disk type resource to return.", + "description": "Name of the disk type to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7108,16 +7364,16 @@ "id": "compute.diskTypes.list", "path": "{project}/zones/{zone}/diskTypes", "httpMethod": "GET", - "description": "Retrieves the list of disk type resources available to the specified project.", + "description": "Retrieves a list of disk types available to the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -7165,16 +7421,16 @@ "id": "compute.disks.aggregatedList", "path": "{project}/aggregated/disks", "httpMethod": "GET", - "description": "Retrieves the list of persistent disks grouped by scope.", + "description": "Retrieves an aggregated list of persistent disks.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -7295,7 +7551,7 @@ "id": "compute.disks.get", "path": "{project}/zones/{zone}/disks/{disk}", "httpMethod": "GET", - "description": "Returns a specified persistent disk.", + "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", "parameters": { "disk": { "type": "string", @@ -7337,7 +7593,7 @@ "id": "compute.disks.insert", "path": "{project}/zones/{zone}/disks", "httpMethod": "POST", - "description": "Creates a persistent disk in the specified project using the data included in the request.", + "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, 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.", "parameters": { "project": { "type": "string", @@ -7378,16 +7634,16 @@ "id": "compute.disks.list", "path": "{project}/zones/{zone}/disks", "httpMethod": "GET", - "description": "Retrieves the list of persistent disks contained within the specified zone.", + "description": "Retrieves a list of persistent disks contained within the specified zone.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -7426,6 +7682,50 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "resize": { + "id": "compute.disks.resize", + "path": "{project}/zones/{zone}/disks/{disk}/resize", + "httpMethod": "POST", + "description": "Resizes the specified persistent disk.", + "parameters": { + "disk": { + "type": "string", + "description": "The name of the persistent disk.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "disk" + ], + "request": { + "$ref": "DisksResizeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -7435,11 +7735,11 @@ "id": "compute.firewalls.delete", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "DELETE", - "description": "Deletes the specified firewall resource.", + "description": "Deletes the specified firewall.", "parameters": { "firewall": { "type": "string", - "description": "Name of the firewall resource to delete.", + "description": "Name of the firewall rule to delete.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7468,11 +7768,11 @@ "id": "compute.firewalls.get", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "GET", - "description": "Returns the specified firewall resource.", + "description": "Returns the specified firewall.", "parameters": { "firewall": { "type": "string", - "description": "Name of the firewall resource to return.", + "description": "Name of the firewall rule to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7502,7 +7802,7 @@ "id": "compute.firewalls.insert", "path": "{project}/global/firewalls", "httpMethod": "POST", - "description": "Creates a firewall resource in the specified project using the data included in the request.", + "description": "Creates a firewall rule in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -7530,16 +7830,16 @@ "id": "compute.firewalls.list", "path": "{project}/global/firewalls", "httpMethod": "GET", - "description": "Retrieves the list of firewall resources available to the specified project.", + "description": "Retrieves the list of firewall rules available to the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -7575,11 +7875,11 @@ "id": "compute.firewalls.patch", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "PATCH", - "description": "Updates the specified firewall resource with the data included in the request. This method supports patch semantics.", + "description": "Updates the specified firewall rule with the data included in the request. This method supports patch semantics.", "parameters": { "firewall": { "type": "string", - "description": "Name of the firewall resource to update.", + "description": "Name of the firewall rule to update.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7611,11 +7911,11 @@ "id": "compute.firewalls.update", "path": "{project}/global/firewalls/{firewall}", "httpMethod": "PUT", - "description": "Updates the specified firewall resource with the data included in the request.", + "description": "Updates the specified firewall rule with the data included in the request.", "parameters": { "firewall": { "type": "string", - "description": "Name of the firewall resource to update.", + "description": "Name of the firewall rule to update.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7651,16 +7951,16 @@ "id": "compute.forwardingRules.aggregatedList", "path": "{project}/aggregated/forwardingRules", "httpMethod": "GET", - "description": "Retrieves the list of forwarding rules grouped by scope.", + "description": "Retrieves an aggregated list of forwarding rules.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -7815,16 +8115,16 @@ "id": "compute.forwardingRules.list", "path": "{project}/regions/{region}/forwardingRules", "httpMethod": "GET", - "description": "Retrieves the list of ForwardingRule resources available to the specified project and region.", + "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -7949,7 +8249,7 @@ "id": "compute.globalAddresses.get", "path": "{project}/global/addresses/{address}", "httpMethod": "GET", - "description": "Returns the specified address resource.", + "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", "parameters": { "address": { "type": "string", @@ -8011,16 +8311,16 @@ "id": "compute.globalAddresses.list", "path": "{project}/global/addresses", "httpMethod": "GET", - "description": "Retrieves the list of global address resources.", + "description": "Retrieves a list of global addresses.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -8093,7 +8393,7 @@ "id": "compute.globalForwardingRules.get", "path": "{project}/global/forwardingRules/{forwardingRule}", "httpMethod": "GET", - "description": "Returns the specified ForwardingRule resource.", + "description": "Returns the specified ForwardingRule resource. Get a list of available forwarding rules by making a list() request.", "parameters": { "forwardingRule": { "type": "string", @@ -8155,16 +8455,16 @@ "id": "compute.globalForwardingRules.list", "path": "{project}/global/forwardingRules", "httpMethod": "GET", - "description": "Retrieves the list of ForwardingRule resources available to the specified project.", + "description": "Retrieves a list of ForwardingRule resources available to the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -8240,16 +8540,16 @@ "id": "compute.globalOperations.aggregatedList", "path": "{project}/aggregated/operations", "httpMethod": "GET", - "description": "Retrieves the list of all operations grouped by scope.", + "description": "Retrieves an aggregated list of all operations.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -8315,7 +8615,7 @@ "id": "compute.globalOperations.get", "path": "{project}/global/operations/{operation}", "httpMethod": "GET", - "description": "Retrieves the specified Operations resource.", + "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", "parameters": { "operation": { "type": "string", @@ -8349,16 +8649,16 @@ "id": "compute.globalOperations.list", "path": "{project}/global/operations", "httpMethod": "GET", - "description": "Retrieves the list of Operation resources contained within the specified project.", + "description": "Retrieves a list of Operation resources contained within the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -8431,7 +8731,7 @@ "id": "compute.httpHealthChecks.get", "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", "httpMethod": "GET", - "description": "Returns the specified HttpHealthCheck resource.", + "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", "parameters": { "httpHealthCheck": { "type": "string", @@ -8497,12 +8797,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -8647,7 +8947,7 @@ "id": "compute.httpsHealthChecks.get", "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", "httpMethod": "GET", - "description": "Returns the specified HttpsHealthCheck resource.", + "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", "parameters": { "httpsHealthCheck": { "type": "string", @@ -8713,12 +9013,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -8830,7 +9130,7 @@ "id": "compute.images.delete", "path": "{project}/global/images/{image}", "httpMethod": "DELETE", - "description": "Deletes the specified image resource.", + "description": "Deletes the specified image.", "parameters": { "image": { "type": "string", @@ -8899,7 +9199,7 @@ "id": "compute.images.get", "path": "{project}/global/images/{image}", "httpMethod": "GET", - "description": "Returns the specified image resource.", + "description": "Returns the specified image. Get a list of available images by making a list() request.", "parameters": { "image": { "type": "string", @@ -8929,11 +9229,45 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getFromFamily": { + "id": "compute.images.getFromFamily", + "path": "{project}/global/images/family/{family}", + "httpMethod": "GET", + "description": "Returns the latest image that is part of an image family and is not deprecated.", + "parameters": { + "family": { + "type": "string", + "description": "Name of the image resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "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" + ] + }, "insert": { "id": "compute.images.insert", "path": "{project}/global/images", "httpMethod": "POST", - "description": "Creates an image resource in the specified project using the data included in the request.", + "description": "Creates an image in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -8968,12 +9302,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -9059,12 +9393,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -9100,7 +9434,7 @@ "id": "compute.instanceGroupManagers.delete", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", "httpMethod": "DELETE", - "description": "Deletes the specified managed instance group and all of the instances in that group.", + "description": "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.", "parameters": { "instanceGroupManager": { "type": "string", @@ -9181,7 +9515,7 @@ "id": "compute.instanceGroupManagers.get", "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", "httpMethod": "GET", - "description": "Returns all of the details about the specified managed instance group.", + "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", "parameters": { "instanceGroupManager": { "type": "string", @@ -9260,12 +9594,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -9525,7 +9859,7 @@ "id": "compute.instanceGroups.addInstances", "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", "httpMethod": "POST", - "description": "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.", + "description": "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.", "parameters": { "instanceGroup": { "type": "string", @@ -9571,12 +9905,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -9612,7 +9946,7 @@ "id": "compute.instanceGroups.delete", "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", "httpMethod": "DELETE", - "description": "Deletes the specified instance group. The instances in the group are not deleted.", + "description": "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.", "parameters": { "instanceGroup": { "type": "string", @@ -9651,7 +9985,7 @@ "id": "compute.instanceGroups.get", "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}", "httpMethod": "GET", - "description": "Returns the specified instance group resource.", + "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", "parameters": { "instanceGroup": { "type": "string", @@ -9730,12 +10064,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -9782,7 +10116,7 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "instanceGroup": { @@ -9793,7 +10127,7 @@ }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -9928,7 +10262,7 @@ "id": "compute.instanceTemplates.delete", "path": "{project}/global/instanceTemplates/{instanceTemplate}", "httpMethod": "DELETE", - "description": "Deletes the specified instance template.", + "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", "parameters": { "instanceTemplate": { "type": "string", @@ -9961,7 +10295,7 @@ "id": "compute.instanceTemplates.get", "path": "{project}/global/instanceTemplates/{instanceTemplate}", "httpMethod": "GET", - "description": "Returns the specified instance template resource.", + "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", "parameters": { "instanceTemplate": { "type": "string", @@ -9995,7 +10329,7 @@ "id": "compute.instanceTemplates.insert", "path": "{project}/global/instanceTemplates", "httpMethod": "POST", - "description": "Creates an instance template in the specified project using the data that is included in the request.", + "description": "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.", "parameters": { "project": { "type": "string", @@ -10027,12 +10361,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -10123,16 +10457,16 @@ "id": "compute.instances.aggregatedList", "path": "{project}/aggregated/instances", "httpMethod": "GET", - "description": "Retrieves aggregated list of instance resources.", + "description": "Retrieves aggregated list of instances.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -10172,7 +10506,7 @@ "parameters": { "instance": { "type": "string", - "description": "Instance name.", + "description": "The instance name for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10357,7 +10691,7 @@ "id": "compute.instances.get", "path": "{project}/zones/{zone}/instances/{instance}", "httpMethod": "GET", - "description": "Returns the specified instance resource.", + "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", "parameters": { "instance": { "type": "string", @@ -10486,16 +10820,16 @@ "id": "compute.instances.list", "path": "{project}/zones/{zone}/instances", "httpMethod": "GET", - "description": "Retrieves the list of instance resources contained within the specified zone.", + "description": "Retrieves the list of instances contained within the specified zone.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -10632,6 +10966,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "setMachineType": { + "id": "compute.instances.setMachineType", + "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", + "httpMethod": "POST", + "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "InstancesSetMachineTypeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setMetadata": { "id": "compute.instances.setMetadata", "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", @@ -10768,7 +11146,7 @@ "id": "compute.instances.start", "path": "{project}/zones/{zone}/instances/{instance}/start", "httpMethod": "POST", - "description": "This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", + "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", "parameters": { "instance": { "type": "string", @@ -10809,7 +11187,7 @@ "id": "compute.instances.stop", "path": "{project}/zones/{zone}/instances/{instance}/stop", "httpMethod": "POST", - "description": "This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance.", + "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", "parameters": { "instance": { "type": "string", @@ -10854,11 +11232,11 @@ "id": "compute.licenses.get", "path": "{project}/global/licenses/{license}", "httpMethod": "GET", - "description": "Returns the specified license resource.", + "description": "Returns the specified License resource. Get a list of available licenses by making a list() request.", "parameters": { "license": { "type": "string", - "description": "Name of the license resource to return.", + "description": "Name of the License resource to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10892,16 +11270,16 @@ "id": "compute.machineTypes.aggregatedList", "path": "{project}/aggregated/machineTypes", "httpMethod": "GET", - "description": "Retrieves the list of machine type resources grouped by scope.", + "description": "Retrieves an aggregated list of machine types.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -10937,11 +11315,11 @@ "id": "compute.machineTypes.get", "path": "{project}/zones/{zone}/machineTypes/{machineType}", "httpMethod": "GET", - "description": "Returns the specified machine type resource.", + "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", "parameters": { "machineType": { "type": "string", - "description": "Name of the machine type resource to return.", + "description": "Name of the machine type to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -10979,16 +11357,16 @@ "id": "compute.machineTypes.list", "path": "{project}/zones/{zone}/machineTypes", "httpMethod": "GET", - "description": "Retrieves the list of machine type resources available to the specified project.", + "description": "Retrieves a list of machine types available to the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -11036,11 +11414,11 @@ "id": "compute.networks.delete", "path": "{project}/global/networks/{network}", "httpMethod": "DELETE", - "description": "Deletes the specified network resource.", + "description": "Deletes the specified network.", "parameters": { "network": { "type": "string", - "description": "Name of the network resource to delete.", + "description": "Name of the network to delete.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11069,11 +11447,11 @@ "id": "compute.networks.get", "path": "{project}/global/networks/{network}", "httpMethod": "GET", - "description": "Returns the specified network resource.", + "description": "Returns the specified network. Get a list of available networks by making a list() request.", "parameters": { "network": { "type": "string", - "description": "Name of the network resource to return.", + "description": "Name of the network to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11103,7 +11481,7 @@ "id": "compute.networks.insert", "path": "{project}/global/networks", "httpMethod": "POST", - "description": "Creates a network resource in the specified project using the data included in the request.", + "description": "Creates a network in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -11131,16 +11509,16 @@ "id": "compute.networks.list", "path": "{project}/global/networks", "httpMethod": "GET", - "description": "Retrieves the list of network resources available to the specified project.", + "description": "Retrieves the list of networks available to the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -11180,7 +11558,7 @@ "id": "compute.projects.get", "path": "{project}", "httpMethod": "GET", - "description": "Returns the specified project resource.", + "description": "Returns the specified Project resource.", "parameters": { "project": { "type": "string", @@ -11343,7 +11721,7 @@ }, "region": { "type": "string", - "description": "Name of the region scoping this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11381,7 +11759,7 @@ }, "region": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11405,16 +11783,16 @@ "id": "compute.regionOperations.list", "path": "{project}/regions/{region}/operations", "httpMethod": "GET", - "description": "Retrieves the list of Operation resources contained within the specified region.", + "description": "Retrieves a list of Operation resources contained within the specified region.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -11435,7 +11813,7 @@ }, "region": { "type": "string", - "description": "Name of the region scoping this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11462,7 +11840,7 @@ "id": "compute.regions.get", "path": "{project}/regions/{region}", "httpMethod": "GET", - "description": "Returns the specified region resource.", + "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", "parameters": { "project": { "type": "string", @@ -11500,12 +11878,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -11545,7 +11923,7 @@ "id": "compute.routes.delete", "path": "{project}/global/routes/{route}", "httpMethod": "DELETE", - "description": "Deletes the specified route resource.", + "description": "Deletes the specified Route resource.", "parameters": { "project": { "type": "string", @@ -11556,7 +11934,7 @@ }, "route": { "type": "string", - "description": "Name of the route resource to delete.", + "description": "Name of the Route resource to delete.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11578,7 +11956,7 @@ "id": "compute.routes.get", "path": "{project}/global/routes/{route}", "httpMethod": "GET", - "description": "Returns the specified route resource.", + "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", "parameters": { "project": { "type": "string", @@ -11589,7 +11967,7 @@ }, "route": { "type": "string", - "description": "Name of the route resource to return.", + "description": "Name of the Route resource to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11612,7 +11990,7 @@ "id": "compute.routes.insert", "path": "{project}/global/routes", "httpMethod": "POST", - "description": "Creates a route resource in the specified project using the data included in the request.", + "description": "Creates a Route resource in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", @@ -11640,16 +12018,16 @@ "id": "compute.routes.list", "path": "{project}/global/routes", "httpMethod": "GET", - "description": "Retrieves the list of route resources available to the specified project.", + "description": "Retrieves the list of Route resources available to the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -11722,7 +12100,7 @@ "id": "compute.snapshots.get", "path": "{project}/global/snapshots/{snapshot}", "httpMethod": "GET", - "description": "Returns the specified Snapshot resource.", + "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", "parameters": { "project": { "type": "string", @@ -11760,12 +12138,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -11838,7 +12216,7 @@ "id": "compute.sslCertificates.get", "path": "{project}/global/sslCertificates/{sslCertificate}", "httpMethod": "GET", - "description": "Returns the specified SslCertificate resource.", + "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", "parameters": { "project": { "type": "string", @@ -11904,12 +12282,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -11943,6 +12321,227 @@ } } }, + "subnetworks": { + "methods": { + "aggregatedList": { + "id": "compute.subnetworks.aggregatedList", + "path": "{project}/aggregated/subnetworks", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of subnetworks.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "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": { + "id": "compute.subnetworks.delete", + "path": "{project}/regions/{region}/subnetworks/{subnetwork}", + "httpMethod": "DELETE", + "description": "Deletes the specified subnetwork.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "subnetwork": { + "type": "string", + "description": "Name of the Subnetwork resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "subnetwork" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.subnetworks.get", + "path": "{project}/regions/{region}/subnetworks/{subnetwork}", + "httpMethod": "GET", + "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "subnetwork": { + "type": "string", + "description": "Name of the Subnetwork resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "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" + ] + }, + "insert": { + "id": "compute.subnetworks.insert", + "path": "{project}/regions/{region}/subnetworks", + "httpMethod": "POST", + "description": "Creates a subnetwork in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "Subnetwork" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.subnetworks.list", + "path": "{project}/regions/{region}/subnetworks", + "httpMethod": "GET", + "description": "Retrieves a list of subnetworks available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "SubnetworkList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "targetHttpProxies": { "methods": { "delete": { @@ -11982,7 +12581,7 @@ "id": "compute.targetHttpProxies.get", "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", "httpMethod": "GET", - "description": "Returns the specified TargetHttpProxy resource.", + "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", "parameters": { "project": { "type": "string", @@ -12048,12 +12647,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -12100,7 +12699,7 @@ }, "targetHttpProxy": { "type": "string", - "description": "Name of the TargetHttpProxy resource whose URL map is to be set.", + "description": "Name of the TargetHttpProxy to set a URL map for.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12162,7 +12761,7 @@ "id": "compute.targetHttpsProxies.get", "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}", "httpMethod": "GET", - "description": "Returns the specified TargetHttpsProxy resource.", + "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", "parameters": { "project": { "type": "string", @@ -12228,12 +12827,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -12280,7 +12879,7 @@ }, "targetHttpsProxy": { "type": "string", - "description": "Name of the TargetHttpsProxy resource whose SSLCertificate is to be set.", + "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12345,16 +12944,16 @@ "id": "compute.targetInstances.aggregatedList", "path": "{project}/aggregated/targetInstances", "httpMethod": "GET", - "description": "Retrieves the list of target instances grouped by scope.", + "description": "Retrieves an aggregated list of target instances.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -12431,7 +13030,7 @@ "id": "compute.targetInstances.get", "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", "httpMethod": "GET", - "description": "Returns the specified TargetInstance resource.", + "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", "parameters": { "project": { "type": "string", @@ -12509,16 +13108,16 @@ "id": "compute.targetInstances.list", "path": "{project}/zones/{zone}/targetInstances", "httpMethod": "GET", - "description": "Retrieves the list of TargetInstance resources available to the specified project and zone.", + "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -12566,10 +13165,11 @@ "id": "compute.targetPools.addHealthCheck", "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", "httpMethod": "POST", - "description": "Adds health check URL to targetPool.", + "description": "Adds health check URLs to a target pool.", "parameters": { "project": { "type": "string", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -12583,7 +13183,7 @@ }, "targetPool": { "type": "string", - "description": "Name of the TargetPool resource to which health_check_url is to be added.", + "description": "Name of the target pool to add a health check to.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12609,10 +13209,11 @@ "id": "compute.targetPools.addInstance", "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", "httpMethod": "POST", - "description": "Adds instance URL to targetPool.", + "description": "Adds an instance to a target pool.", "parameters": { "project": { "type": "string", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -12626,7 +13227,7 @@ }, "targetPool": { "type": "string", - "description": "Name of the TargetPool resource to which instance_url is to be added.", + "description": "Name of the TargetPool resource to add instances to.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12652,16 +13253,16 @@ "id": "compute.targetPools.aggregatedList", "path": "{project}/aggregated/targetPools", "httpMethod": "GET", - "description": "Retrieves the list of target pools grouped by scope.", + "description": "Retrieves an aggregated list of target pools.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -12697,7 +13298,7 @@ "id": "compute.targetPools.delete", "path": "{project}/regions/{region}/targetPools/{targetPool}", "httpMethod": "DELETE", - "description": "Deletes the specified TargetPool resource.", + "description": "Deletes the specified target pool.", "parameters": { "project": { "type": "string", @@ -12738,7 +13339,7 @@ "id": "compute.targetPools.get", "path": "{project}/regions/{region}/targetPools/{targetPool}", "httpMethod": "GET", - "description": "Returns the specified TargetPool resource.", + "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", "parameters": { "project": { "type": "string", @@ -12780,10 +13381,11 @@ "id": "compute.targetPools.getHealth", "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", "httpMethod": "POST", - "description": "Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool.", + "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", "parameters": { "project": { "type": "string", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -12824,7 +13426,7 @@ "id": "compute.targetPools.insert", "path": "{project}/regions/{region}/targetPools", "httpMethod": "POST", - "description": "Creates a TargetPool resource in the specified project and region using the data included in the request.", + "description": "Creates a target pool in the specified project and region using the data included in the request.", "parameters": { "project": { "type": "string", @@ -12860,16 +13462,16 @@ "id": "compute.targetPools.list", "path": "{project}/regions/{region}/targetPools", "httpMethod": "GET", - "description": "Retrieves the list of TargetPool resources available to the specified project and region.", + "description": "Retrieves a list of target pools available to the specified project and region.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -12913,24 +13515,25 @@ "id": "compute.targetPools.removeHealthCheck", "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", "httpMethod": "POST", - "description": "Removes health check URL from targetPool.", + "description": "Removes health check URL from a target pool.", "parameters": { "project": { "type": "string", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "region": { "type": "string", - "description": "Name of the region scoping this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "targetPool": { "type": "string", - "description": "Name of the TargetPool resource to which health_check_url is to be removed.", + "description": "Name of the target pool to remove health checks from.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12956,10 +13559,11 @@ "id": "compute.targetPools.removeInstance", "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", "httpMethod": "POST", - "description": "Removes instance URL from targetPool.", + "description": "Removes instance URL from a target pool.", "parameters": { "project": { "type": "string", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -12973,7 +13577,7 @@ }, "targetPool": { "type": "string", - "description": "Name of the TargetPool resource to which instance_url is to be removed.", + "description": "Name of the TargetPool resource to remove instances from.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -12999,11 +13603,11 @@ "id": "compute.targetPools.setBackup", "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", "httpMethod": "POST", - "description": "Changes backup pool configurations.", + "description": "Changes a backup target pool's configurations.", "parameters": { "failoverRatio": { "type": "number", - "description": "New failoverRatio value for the containing target pool.", + "description": "New failoverRatio value for the target pool.", "format": "float", "location": "query" }, @@ -13023,7 +13627,7 @@ }, "targetPool": { "type": "string", - "description": "Name of the TargetPool resource for which the backup is to be set.", + "description": "Name of the TargetPool resource to set a backup pool for.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13053,16 +13657,16 @@ "id": "compute.targetVpnGateways.aggregatedList", "path": "{project}/aggregated/targetVpnGateways", "httpMethod": "GET", - "description": "Retrieves the list of target VPN gateways grouped by scope.", + "description": "Retrieves an aggregated list of target VPN gateways.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -13098,7 +13702,7 @@ "id": "compute.targetVpnGateways.delete", "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", "httpMethod": "DELETE", - "description": "Deletes the specified TargetVpnGateway resource.", + "description": "Deletes the specified target VPN gateway.", "parameters": { "project": { "type": "string", @@ -13109,14 +13713,14 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "targetVpnGateway": { "type": "string", - "description": "Name of the TargetVpnGateway resource to delete.", + "description": "Name of the target VPN gateway to delete.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13139,7 +13743,7 @@ "id": "compute.targetVpnGateways.get", "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", "httpMethod": "GET", - "description": "Returns the specified TargetVpnGateway resource.", + "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", "parameters": { "project": { "type": "string", @@ -13150,14 +13754,14 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "targetVpnGateway": { "type": "string", - "description": "Name of the TargetVpnGateway resource to return.", + "description": "Name of the target VPN gateway to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13181,7 +13785,7 @@ "id": "compute.targetVpnGateways.insert", "path": "{project}/regions/{region}/targetVpnGateways", "httpMethod": "POST", - "description": "Creates a TargetVpnGateway resource in the specified project and region using the data included in the request.", + "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", "parameters": { "project": { "type": "string", @@ -13192,7 +13796,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13217,16 +13821,16 @@ "id": "compute.targetVpnGateways.list", "path": "{project}/regions/{region}/targetVpnGateways", "httpMethod": "GET", - "description": "Retrieves the list of TargetVpnGateway resources available to the specified project and region.", + "description": "Retrieves a list of target VPN gateways available to the specified project and region.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -13247,7 +13851,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13307,7 +13911,7 @@ "id": "compute.urlMaps.get", "path": "{project}/global/urlMaps/{urlMap}", "httpMethod": "GET", - "description": "Returns the specified UrlMap resource.", + "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", "parameters": { "project": { "type": "string", @@ -13373,12 +13977,12 @@ "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -13414,7 +14018,7 @@ "id": "compute.urlMaps.patch", "path": "{project}/global/urlMaps/{urlMap}", "httpMethod": "PATCH", - "description": "Update the entire content of the UrlMap resource. This method supports patch semantics.", + "description": "Updates the entire content of the UrlMap resource. This method supports patch semantics.", "parameters": { "project": { "type": "string", @@ -13450,7 +14054,7 @@ "id": "compute.urlMaps.update", "path": "{project}/global/urlMaps/{urlMap}", "httpMethod": "PUT", - "description": "Update the entire content of the UrlMap resource.", + "description": "Updates the entire content of the UrlMap resource.", "parameters": { "project": { "type": "string", @@ -13486,7 +14090,7 @@ "id": "compute.urlMaps.validate", "path": "{project}/global/urlMaps/{urlMap}/validate", "httpMethod": "POST", - "description": "Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + "description": "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.", "parameters": { "project": { "type": "string", @@ -13526,16 +14130,16 @@ "id": "compute.vpnTunnels.aggregatedList", "path": "{project}/aggregated/vpnTunnels", "httpMethod": "GET", - "description": "Retrieves the list of VPN tunnels grouped by scope.", + "description": "Retrieves an aggregated list of VPN tunnels.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -13582,7 +14186,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13612,7 +14216,7 @@ "id": "compute.vpnTunnels.get", "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", "httpMethod": "GET", - "description": "Returns the specified VpnTunnel resource.", + "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", "parameters": { "project": { "type": "string", @@ -13623,7 +14227,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13665,7 +14269,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13690,16 +14294,16 @@ "id": "compute.vpnTunnels.list", "path": "{project}/regions/{region}/vpnTunnels", "httpMethod": "GET", - "description": "Retrieves the list of VpnTunnel resources contained in the specified project and region.", + "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -13720,7 +14324,7 @@ }, "region": { "type": "string", - "description": "The name of the region for this request.", + "description": "Name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13765,7 +14369,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13803,7 +14407,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13827,16 +14431,16 @@ "id": "compute.zoneOperations.list", "path": "{project}/zones/{zone}/operations", "httpMethod": "GET", - "description": "Retrieves the list of Operation resources contained within the specified zone.", + "description": "Retrieves a list of Operation resources contained within the specified zone.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", @@ -13857,7 +14461,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the zone for request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -13884,7 +14488,7 @@ "id": "compute.zones.get", "path": "{project}/zones/{zone}", "httpMethod": "GET", - "description": "Returns the specified zone resource.", + "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", "parameters": { "project": { "type": "string", @@ -13918,16 +14522,16 @@ "id": "compute.zones.list", "path": "{project}/zones", "httpMethod": "GET", - "description": "Retrieves the list of zone resources available to the specified project.", + "description": "Retrieves the list of Zone resources available to the specified project.", "parameters": { "filter": { "type": "string", - "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", "location": "query" }, "maxResults": { "type": "integer", - "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", "default": "500", "format": "uint32", "minimum": "0", diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go index 616e05e3699..cf7442c2fdb 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -97,6 +97,7 @@ func New(client *http.Client) (*Service, error) { s.Routes = NewRoutesService(s) s.Snapshots = NewSnapshotsService(s) s.SslCertificates = NewSslCertificatesService(s) + s.Subnetworks = NewSubnetworksService(s) s.TargetHttpProxies = NewTargetHttpProxiesService(s) s.TargetHttpsProxies = NewTargetHttpsProxiesService(s) s.TargetInstances = NewTargetInstancesService(s) @@ -166,6 +167,8 @@ type Service struct { SslCertificates *SslCertificatesService + Subnetworks *SubnetworksService + TargetHttpProxies *TargetHttpProxiesService TargetHttpsProxies *TargetHttpsProxiesService @@ -426,6 +429,15 @@ type SslCertificatesService struct { s *Service } +func NewSubnetworksService(s *Service) *SubnetworksService { + rs := &SubnetworksService{s: s} + return rs +} + +type SubnetworksService struct { + s *Service +} + func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService { rs := &TargetHttpProxiesService{s: s} return rs @@ -567,7 +579,7 @@ type Address struct { // addresses. Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource + // Name: Name of the resource. Provided by the client when the resource // is created. 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 @@ -658,13 +670,13 @@ func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// AddressList: Contains a list of address resources. +// AddressList: Contains a list of addresses. type AddressList 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 Address resources. + // Items: [Output Only] A list of addresses. Items []*Address `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#addressList for @@ -732,6 +744,7 @@ type AddressesScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -777,7 +790,7 @@ type AddressesScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -840,8 +853,11 @@ type AttachedDisk struct { InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` // Interface: Specifies the disk interface to use for attaching this - // disk, either SCSI or NVME. The default is SCSI. For performance - // characteristics of SCSI over NVMe, see Local SSD performance. + // disk, which is either SCSI or NVME. The default is SCSI. Persistent + // disks must always use SCSI and the request will fail if you attempt + // to attach a persistent disk in any other format than SCSI. Local SSDs + // can use either NVME or SCSI. For performance characteristics of SCSI + // over NVMe, see Local SSD performance. // // Possible values: // "NVME" @@ -924,22 +940,32 @@ type AttachedDiskInitializeParams struct { // - zones/zone/diskTypes/diskType DiskType string `json:"diskType,omitempty"` - // SourceImage: A source image used to create the disk. You can provide - // a private (custom) image, and Compute Engine will use the - // corresponding image from your project. For - // example: + // 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, specify + // family/debian-8 to use the latest Debian 8 + // image: + // + // projects/debian-cloud/global/images/family/debian-8 + // + // Alternatively, use a specific version of a public operating system + // image: + // + // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD + // + // To create a disk with a private image that you created, specify the + // image name in the following format: // // global/images/my-private-image // - // Or you can provide an image from a publicly-available project. For - // example, to use a Debian image from the debian-cloud project, make - // sure to include the project in the - // URL: + // You can also specify a private image by its image family, which + // returns the latest version of the image in that family. Replace the + // image name with + // family/family-name: // - // projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD - // - // where vYYYYMMDD is the image version. The fully-qualified URL will - // also work in both cases. + // global/images/family/my-private-family SourceImage string `json:"sourceImage,omitempty"` // ForceSendFields is a list of field names (e.g. "DiskName") to @@ -957,8 +983,18 @@ func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you +// to automatically scale virtual machine instances in managed instance +// groups according to an autoscaling policy that you define. For more +// information, read Autoscaling Groups of Instances. type Autoscaler struct { - // AutoscalingPolicy: Autoscaling configuration. + // AutoscalingPolicy: The configuration parameters for the autoscaling + // algorithm. You can define one or more of the policies for an + // autoscaler: cpuUtilization, customMetricUtilizations, and + // loadBalancingUtilization. + // + // If none of these are specified, the default will be to autoscale + // based on cpuUtilization to 0.8 or 80%. AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -973,7 +1009,8 @@ type Autoscaler struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // 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 @@ -988,8 +1025,8 @@ type Autoscaler struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Target: URL of Instance Group Manager or Replica Pool which will be - // controlled by Autoscaler. + // Target: URL of the managed instance group that this autoscaler will + // scale. Target string `json:"target,omitempty"` // Zone: [Output Only] URL of the zone where the instance group resides. @@ -1022,7 +1059,8 @@ type AutoscalerAggregatedList struct { // Items: A map of scoped autoscaler lists. Items map[string]AutoscalersScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#autoscalerAggregatedList for aggregated lists of autoscalers. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -1055,7 +1093,7 @@ func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// AutoscalerList: Contains a list of persistent autoscaler resources. +// AutoscalerList: Contains a list of Autoscaler resources. type AutoscalerList struct { // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. @@ -1064,7 +1102,8 @@ type AutoscalerList struct { // Items: A list of Autoscaler resources. Items []*Autoscaler `json:"items,omitempty"` - // Kind: Type of resource. + // 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 @@ -1098,11 +1137,12 @@ func (s *AutoscalerList) MarshalJSON() ([]byte, error) { } type AutoscalersScopedList struct { - // Autoscalers: List of autoscalers contained in this scope. + // Autoscalers: [Output Only] List of autoscalers contained in this + // scope. Autoscalers []*Autoscaler `json:"autoscalers,omitempty"` - // Warning: Informational warning which replaces the list of autoscalers - // when the list is empty. + // 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 @@ -1120,14 +1160,15 @@ func (s *AutoscalersScopedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// AutoscalersScopedListWarning: Informational warning which replaces -// the list of autoscalers when the list is empty. +// 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" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -1173,7 +1214,7 @@ type AutoscalersScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -1199,38 +1240,42 @@ func (s *AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) { // AutoscalingPolicy: Cloud Autoscaler policy. type AutoscalingPolicy struct { - // CoolDownPeriodSec: The number of seconds that the Autoscaler should - // wait between two succeeding changes to the number of virtual - // machines. You should define an interval that is at least as long as - // the initialization time of a virtual machine and the time it may take - // for replica pool to create the virtual machine. The default is 60 + // CoolDownPeriodSec: The number of seconds that the autoscaler should + // wait before it starts collecting information from a new instance. + // This prevents the autoscaler from collecting information when the + // instance is initializing, during which the collected usage would not + // be reliable. The default time autoscaler waits is 60 // seconds. + // + // Virtual machine initialization times might vary because of numerous + // factors. We recommend that you test how long an instance may take to + // initialize. To do this, create an instance and time the startup + // process. CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"` - // CpuUtilization: TODO(jbartosik): Add support for scaling based on - // muliple utilization metrics (take max recommendation). Exactly one - // utilization policy should be provided. Configuration parameters of - // CPU based autoscaling policy. + // 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 custom metric. + // 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 replicas that the Autoscaler - // can scale up to. This field is required for config to be effective. - // Maximum number of replicas should be not lower than minimal number of - // replicas. Absolute limit for this value is defined in Autoscaler - // backend. + // MaxNumReplicas: The maximum number of instances that the autoscaler + // can scale up to. This is required when creating or updating an + // autoscaler. The maximum number of replicas should not be lower than + // minimal number of replicas. MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"` - // MinNumReplicas: The minimum number of replicas that the Autoscaler - // can scale down to. Can't be less than 0. If not provided Autoscaler - // will choose default value depending on maximal number of replicas. + // MinNumReplicas: The minimum number of replicas that the autoscaler + // can scale down to. This cannot be less than 0. If not provided, + // autoscaler will choose a default value depending on maximum number of + // instances allowed. MinNumReplicas int64 `json:"minNumReplicas,omitempty"` // ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec") @@ -1250,10 +1295,19 @@ func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) { // AutoscalingPolicyCpuUtilization: CPU utilization policy. type AutoscalingPolicyCpuUtilization struct { - // UtilizationTarget: The target utilization that the Autoscaler should - // maintain. It is represented as a fraction of used cores. For example: - // 6 cores used in 8-core VM are represented here as 0.75. Must be a - // float value between (0, 1]. If not defined, the default is 0.8. + // UtilizationTarget: The target CPU utilization that the autoscaler + // should maintain. Must be a float value in the range (0, 1]. If not + // specified, the default is 0.8. + // + // If the CPU level is below the target utilization, the autoscaler + // scales down 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 up 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. "UtilizationTarget") @@ -1274,20 +1328,34 @@ func (s *AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) { // AutoscalingPolicyCustomMetricUtilization: Custom utilization metric // policy. type AutoscalingPolicyCustomMetricUtilization struct { - // Metric: Identifier of the metric. It should be a Cloud Monitoring - // metric. The metric can not have negative values. The metric should be - // an utilization metric (increasing number of VMs handling requests x - // times should reduce average value of the metric roughly x times). For - // example you could use: - // compute.googleapis.com/instance/network/received_bytes_count. + // Metric: The identifier of the Cloud Monitoring metric. The metric + // cannot have negative values and should be a utilization metric, which + // means that the number of virtual machines handling requests should + // increase or decrease proportionally to the metric. The metric must + // also have a label of compute.googleapis.com/resource_id with the + // value of the instance's unique ID, although this alone does not + // guarantee that the metric is valid. + // + // For example, the following is a valid + // metric: + // compute.googleapis.com/instance/network/received_bytes_count + // + // + // + // The following is not a valid metric because it does not increase or + // decrease based on + // usage: + // compute.googleapis.com/instance/cpu/reserved_cores Metric string `json:"metric,omitempty"` - // UtilizationTarget: Target value of the metric which Autoscaler should + // UtilizationTarget: Target value of the metric which autoscaler should // maintain. Must be a positive value. UtilizationTarget float64 `json:"utilizationTarget,omitempty"` - // UtilizationTargetType: Defines type in which utilization_target is - // expressed. + // UtilizationTargetType: Defines how target utilization value is + // expressed for a Cloud Monitoring metric. Either GAUGE, + // DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default + // is GAUGE. // // Possible values: // "DELTA_PER_MINUTE" @@ -1310,16 +1378,13 @@ func (s *AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// AutoscalingPolicyLoadBalancingUtilization: Load balancing utilization -// policy. +// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters +// of autoscaling based on load balancing. type AutoscalingPolicyLoadBalancingUtilization struct { // UtilizationTarget: Fraction of backend capacity utilization (set in - // HTTP load balancing configuration) that Autoscaler should maintain. - // Must be a positive float value. If not defined, the default is 0.8. - // For example if your maxRatePerInstance capacity (in HTTP Load - // Balancing configuration) is set at 10 and you would like to keep - // number of instances such that each instance receives 7 QPS on - // average, set this to 0.7. + // HTTP(s) load balancing configuration) that autoscaler should + // maintain. 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") @@ -1339,8 +1404,9 @@ func (s *AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error // Backend: Message containing information of one individual backend. type Backend struct { - // BalancingMode: Specifies the balancing mode for this backend. The - // default is UTILIZATION but available values are UTILIZATION and RATE. + // BalancingMode: Specifies the balancing mode for this backend. For + // global HTTP(S) load balancing, the default is UTILIZATION. Valid + // values are UTILIZATION and RATE. // // Possible values: // "RATE" @@ -1370,15 +1436,16 @@ type Backend struct { // fully-qualified URL, rather than a partial URL. Group string `json:"group,omitempty"` - // MaxRate: The max RPS of the group. Can be used with either balancing - // mode, but required if RATE mode. For RATE mode, either maxRate or - // maxRatePerInstance must be set. + // MaxRate: The max requests per second (RPS) of the group. Can be used + // with either RATE or UTILIZATION balancing modes, but required if RATE + // mode. For RATE mode, either maxRate or maxRatePerInstance must be + // set. MaxRate int64 `json:"maxRate,omitempty"` - // MaxRatePerInstance: The max RPS that a single backed instance can - // handle. This is used to calculate the capacity of the group. Can be - // used in either balancing mode. For RATE mode, either maxRate or - // maxRatePerInstance must be set. + // MaxRatePerInstance: The max requests per second (RPS) that a single + // backend instance can handle.This is used to calculate the capacity of + // the group. Can be used in either balancing mode. For RATE mode, + // either maxRate or maxRatePerInstance must be set. MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio @@ -1402,8 +1469,7 @@ func (s *Backend) MarshalJSON() ([]byte, error) { } // BackendService: A BackendService resource. This resource defines a -// group of backend virtual machines together with their serving -// capacity. +// group of backend virtual machines and their serving capacity. type BackendService struct { // Backends: The list of backends that serve this BackendService. Backends []*Backend `json:"backends,omitempty"` @@ -1445,19 +1511,29 @@ type BackendService struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Port: Deprecated in favor of port name. The TCP port to connect on - // the backend. The default value is 80. + // Port: Deprecated in favor of portName. The TCP port to connect on the + // backend. The default value is 80. Port int64 `json:"port,omitempty"` // PortName: Name of backend port. The same name should appear in the - // resource views referenced by this service. Required. + // instance groups referenced by this service. Required. PortName string `json:"portName,omitempty"` + // Protocol: The protocol this BackendService uses to communicate with + // backends. + // + // Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. + // // Possible values: // "HTTP" // "HTTPS" 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. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -1626,10 +1702,10 @@ type Disk struct { // text format. LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"` - // Licenses: Any applicable publicly visible licenses. + // Licenses: [Output Only] Any applicable publicly visible licenses. Licenses []string `json:"licenses,omitempty"` - // Name: Name of the resource; provided by the client when the resource + // Name: Name of the resource. Provided by the client when the resource // is created. 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 @@ -1656,32 +1732,39 @@ type Disk struct { SizeGb int64 `json:"sizeGb,omitempty,string"` // SourceImage: The source image used to create this disk. If the source - // image is deleted from the system, this field will not be set, even if - // an image with the same name has been re-created. + // image is deleted, this field will not be set. // - // When creating a disk, you can provide a private (custom) image using - // the following input, and Compute Engine will use the corresponding - // image from your project. For example: + // To create a disk with one of the public operating system images, + // specify the image by its family name. For example, specify + // family/debian-8 to use the latest Debian 8 + // image: + // + // projects/debian-cloud/global/images/family/debian-8 + // + // Alternatively, use a specific version of a public operating system + // image: + // + // projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD + // + // To create a disk with a private image that you created, specify the + // image name in the following format: // // global/images/my-private-image // - // Or you can provide an image from a publicly-available project. For - // example, to use a Debian image from the debian-cloud project, make - // sure to include the project in the - // URL: + // You can also specify a private image by its image family, which + // returns the latest version of the image in that family. Replace the + // image name with + // family/family-name: // - // projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD - // - // where vYYYYMMDD is the image version. The fully-qualified URL will - // also work in both cases. + // global/images/family/my-private-family SourceImage string `json:"sourceImage,omitempty"` - // SourceImageId: 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: [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"` // SourceSnapshot: The source snapshot used to create this disk. You can @@ -1712,11 +1795,11 @@ type Disk struct { Status string `json:"status,omitempty"` // Type: URL of the disk type resource describing which disk type to use - // to create the disk; provided by the client when the disk is created. + // to create the disk. Provide this when creating the disk. Type string `json:"type,omitempty"` - // Users: Links to the users of the disk (attached instances) in form: - // project/zones/zone/instances/instance + // Users: [Output Only] Links to the users of the disk (attached + // instances) in form: project/zones/zone/instances/instance Users []string `json:"users,omitempty"` // Zone: [Output Only] URL of the zone where the disk resides. @@ -1827,7 +1910,7 @@ func (s *DiskList) MarshalJSON() ([]byte, error) { } type DiskMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the disk to. + // 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 @@ -1860,7 +1943,7 @@ func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// DiskType: A disk type resource. +// DiskType: A DiskType resource. type DiskType struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -1959,7 +2042,7 @@ func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// DiskTypeList: Contains a list of disk type resources. +// DiskTypeList: Contains a list of disk types. type DiskTypeList struct { // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. @@ -2033,6 +2116,7 @@ type DiskTypesScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -2078,7 +2162,7 @@ type DiskTypesScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -2102,6 +2186,26 @@ func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *DisksResizeRequest) MarshalJSON() ([]byte, error) { + type noMethod DisksResizeRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + type DisksScopedList struct { // Disks: [Output Only] List of disks contained in this scope. Disks []*Disk `json:"disks,omitempty"` @@ -2133,6 +2237,7 @@ type DisksScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -2178,7 +2283,7 @@ type DisksScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -2202,7 +2307,7 @@ func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// Firewall: A Firewall resource. +// Firewall: Represents a Firewall resource. type Firewall struct { // Allowed: The list of rules specified by this firewall. Each rule // specifies a protocol and port-range tuple that describes a permitted @@ -2234,10 +2339,9 @@ type Firewall struct { // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: URL of the network resource for this firewall rule. This - // field is required for creating an instance but optional when creating - // a firewall rule. If not specified when creating a firewall rule, the - // default network is used: + // 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 property, you can specify the network // as a full or partial URL. For example, the following are all valid @@ -2297,9 +2401,9 @@ func (s *Firewall) MarshalJSON() ([]byte, error) { type FirewallAllowed struct { // IPProtocol: The IP protocol that is allowed for this rule. The - // protocol type is required when creating a firewall. This value can - // either be one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp), or the IP protocol number. + // 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, sctp), or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports which are allowed. This field is @@ -2325,7 +2429,7 @@ func (s *FirewallAllowed) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// FirewallList: Contains a list of Firewall resources. +// FirewallList: Contains a list of firewalls. type FirewallList struct { // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. @@ -2381,7 +2485,7 @@ type ForwardingRule struct { IPAddress string `json:"IPAddress,omitempty"` // IPProtocol: The IP protocol to which this rule applies. Valid options - // are TCP, UDP, ESP, AH or SCTP. + // are TCP, UDP, ESP, AH, SCTP or ICMP. // // Possible values: // "AH" @@ -2434,6 +2538,9 @@ type ForwardingRule struct { // traffic. For regional forwarding rules, this target must live in the // same region as the forwarding rule. For global forwarding rules, this // target must be a global TargetHttpProxy or TargetHttpsProxy resource. + // The forwarded traffic must be of a type appropriate to the target + // object. For example, TargetHttpProxy requires HTTP traffic, and + // TargetHttpsProxy requires HTTPS traffic. Target string `json:"target,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2463,7 +2570,8 @@ type ForwardingRuleAggregatedList struct { // Items: A map of scoped forwarding rule lists. Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#forwardingRuleAggregatedList for lists of forwarding rules. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -2569,6 +2677,7 @@ type ForwardingRulesScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -2614,7 +2723,7 @@ type ForwardingRulesScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -2638,6 +2747,12 @@ func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +// 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"` @@ -2749,7 +2864,8 @@ type HttpHealthCheck struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always + // compute#httpHealthCheck for HTTP health checks. Kind string `json:"kind,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -2766,7 +2882,7 @@ type HttpHealthCheck struct { Port int64 `json:"port,omitempty"` // RequestPath: The request path of the HTTP health check request. The - // default value is "/". + // default value is /. RequestPath string `json:"requestPath,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -2987,6 +3103,12 @@ type Image struct { // (in GB). DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + // Family: The name of the image family to which this image belongs. You + // can create disks by specifying an image family instead of a specific + // image name. The image family always returns its latest image that is + // not deprecated. + Family string `json:"family,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -3100,7 +3222,7 @@ func (s *ImageRawDisk) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// ImageList: Contains a list of Image resources. +// ImageList: Contains a list of images. type ImageList struct { // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. @@ -3157,16 +3279,16 @@ type Instance struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional textual description of the resource; - // provided by the client when the resource is created. + // 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"` - // Id: [Output Only] Unique identifier for the resource. This identifier - // is defined by the server. + // 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#instance for @@ -3174,10 +3296,10 @@ type Instance struct { Kind string `json:"kind,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 + // 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 @@ -3201,13 +3323,14 @@ type Instance struct { // This includes custom metadata and predefined keys. Metadata *Metadata `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 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: 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 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"` // NetworkInterfaces: An array of configurations for this interface. @@ -3218,7 +3341,7 @@ type Instance struct { // Scheduling: Scheduling options for this instance. Scheduling *Scheduling `json:"scheduling,omitempty"` - // SelfLink: [Output Only] Server defined URL for this resource. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServiceAccounts: A list of service accounts, with their specified @@ -3247,7 +3370,7 @@ type Instance struct { // of the status. StatusMessage string `json:"statusMessage,omitempty"` - // Tags: A list of tags to appy to this instance. Tags are used to + // Tags: A list of 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 @@ -3289,11 +3412,15 @@ type InstanceAggregatedList struct { // resources. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. + // 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: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -3352,8 +3479,8 @@ type InstanceGroup struct { // 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. + // Network: The URL of the network to which all instances in the + // instance group belong. Network string `json:"network,omitempty"` // SelfLink: [Output Only] The URL for this instance group. The server @@ -3364,6 +3491,10 @@ type InstanceGroup struct { // group. Size int64 `json:"size,omitempty"` + // Subnetwork: The URL of the subnetwork to which all instances in the + // instance group belong. + Subnetwork string `json:"subnetwork,omitempty"` + // Zone: [Output Only] The URL of the zone where the instance group is // located. Zone string `json:"zone,omitempty"` @@ -3475,9 +3606,6 @@ func (s *InstanceGroupList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// InstanceGroupManager: InstanceGroupManagers -// -// Next available tag: 20 type InstanceGroupManager struct { // BaseInstanceName: The base instance name to use for instances in this // group. The value must be 1-58 characters long. Instances are named by @@ -3498,9 +3626,9 @@ type InstanceGroupManager struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Fingerprint: [Output Only] The fingerprint of the target pools - // information. You can use this optional field for optimistic locking - // when you update the target pool entries. + // Fingerprint: [Output Only] The fingerprint of the resource data. You + // can use this optional field for optimistic locking when you update + // the resource. Fingerprint string `json:"fingerprint,omitempty"` // Id: [Output Only] A unique identifier for this resource type. The @@ -3573,7 +3701,8 @@ type InstanceGroupManagerActionsSummary struct { // Creating: [Output Only] The number of instances in the managed // instance group that are scheduled to be created or are currently - // being created. + // being created. If the group fails to create one of these instances, + // it tries again until it creates the instance successfully. Creating int64 `json:"creating,omitempty"` // Deleting: [Output Only] The number of instances in the managed @@ -3825,6 +3954,7 @@ type InstanceGroupManagersScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -3870,7 +4000,7 @@ type InstanceGroupManagersScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -4087,6 +4217,7 @@ type InstanceGroupsScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -4132,7 +4263,7 @@ type InstanceGroupsScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -4183,24 +4314,28 @@ func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// InstanceList: Contains a list of instance resources. +// InstanceList: Contains a list of instances. type InstanceList 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 Instance resources. + // Items: [Output Only] A list of instances. 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] A token used to continue a truncated - // list request. + // 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: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4223,9 +4358,9 @@ func (s *InstanceList) MarshalJSON() ([]byte, error) { } type InstanceMoveRequest struct { - // DestinationZone: The URL of the destination zone to move the instance - // to. This can be a full or partial URL. For example, the following are - // all valid URLs to a zone: + // 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 @@ -4502,6 +4637,7 @@ type InstancesScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -4547,7 +4683,7 @@ type InstancesScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -4571,6 +4707,27 @@ func (s *InstancesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) { + type noMethod InstancesSetMachineTypeRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + // License: A license resource. type License struct { // ChargesUseFee: [Output Only] If true, the customer will be charged @@ -4745,7 +4902,7 @@ func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// MachineTypeList: Contains a list of Machine Type resources. +// MachineTypeList: Contains a list of machine types. type MachineTypeList struct { // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. @@ -4820,6 +4977,7 @@ type MachineTypesScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -4865,7 +5023,7 @@ type MachineTypesScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -4894,7 +5052,13 @@ type ManagedInstance struct { // 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. + // - 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 target_size value is + // decreased. // - RECREATING The managed instance group is recreating this instance. // // - DELETING The managed instance group is permanently deleting this @@ -5006,7 +5170,7 @@ type ManagedInstanceLastAttemptErrorsErrors struct { // Code: [Output Only] The error type identifier for this error. Code string `json:"code,omitempty"` - // Location: [Output Only] Indicates the field in the request which + // Location: [Output Only] Indicates the field in the request that // caused the error. This property is optional. Location string `json:"location,omitempty"` @@ -5114,13 +5278,23 @@ func (s *NamedPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// Network: A network resource. +// Network: Represents a Network resource. Read Networks and Firewalls +// for more information. type Network struct { // IPv4Range: The range of internal addresses that are legal on this // network. This range is a CIDR specification, for example: // 192.168.0.0/16. Provided by the client when the network is created. IPv4Range string `json:"IPv4Range,omitempty"` + // AutoCreateSubnetworks: When set to true, the network is created in + // "auto subnet mode". When set to false, the network is in "custom + // subnet mode". + // + // In "auto subnet mode", a newly created network is assigned the + // default CIDR of 10.128.0.0/9 and it automatically creates one + // subnetwork per region. + AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -5154,6 +5328,10 @@ type Network struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // Subnetworks: [Output Only] Server-defined fully-qualified URLs for + // all subnetworks in this network. + Subnetworks []string `json:"subnetworks,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -5201,10 +5379,23 @@ type NetworkInterface struct { // - global/networks/default Network string `json:"network,omitempty"` - // NetworkIP: [Output Only] An optional IPV4 internal network address - // assigned to the instance for this network interface. + // NetworkIP: An IPV4 internal network address to assign to the instance + // for this network interface. If not specified by user an unused + // internal IP is assigned by system. NetworkIP string `json:"networkIP,omitempty"` + // Subnetwork: The URL of the Subnetwork resource for this instance. If + // the network resource is in legacy mode, do not provide this property. + // If the network is in auto subnet mode, providing the subnetwork is + // optional. If the network is in custom subnet mode, then this field + // should be specified. 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"` + // ForceSendFields is a list of field names (e.g. "AccessConfigs") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -5220,7 +5411,7 @@ func (s *NetworkInterface) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// NetworkList: Contains a list of Network resources. +// NetworkList: Contains a list of networks. type NetworkList struct { // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. @@ -5266,8 +5457,7 @@ func (s *NetworkList) MarshalJSON() ([]byte, error) { // Operation: An Operation resource, used to manage asynchronous API // requests. type Operation struct { - // ClientOperationId: [Output Only] A unique client ID generated by the - // server. + // ClientOperationId: [Output Only] Reserved for future use. ClientOperationId string `json:"clientOperationId,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -5291,8 +5481,8 @@ type Operation struct { HttpErrorMessage string `json:"httpErrorMessage,omitempty"` // HttpErrorStatusCode: [Output Only] If the operation fails, this field - // contains the HTTP error message that was returned. For example, a 404 - // means the resource was not found. + // 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 resource. This @@ -5310,19 +5500,19 @@ type Operation struct { // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` - // OperationType: [Output Only] The type of operation, which can be - // insert, update, or delete. + // 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 at - // when the operation will be complete. This number should monotonically + // 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] URL of the region where the operation resides. - // Only applicable for regional resources. + // Region: [Output Only] The URL of the region where the operation + // resides. Only available when performing regional operations. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -5350,7 +5540,7 @@ type Operation struct { TargetId uint64 `json:"targetId,omitempty,string"` // TargetLink: [Output Only] The URL of the resource that the operation - // is modifying. + // modifies. TargetLink string `json:"targetLink,omitempty"` // User: [Output Only] User who requested the operation, for example: @@ -5361,7 +5551,8 @@ type Operation struct { // processing of the operation, this field will be populated. Warnings []*OperationWarnings `json:"warnings,omitempty"` - // Zone: [Output Only] URL of the zone where the operation resides. + // Zone: [Output Only] The URL of the zone where the operation resides. + // Only available when performing per-zone operations. Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5409,7 +5600,7 @@ type OperationErrorErrors struct { // Code: [Output Only] The error type identifier for this error. Code string `json:"code,omitempty"` - // Location: [Output Only] Indicates the field in the request which + // Location: [Output Only] Indicates the field in the request that // caused the error. This property is optional. Location string `json:"location,omitempty"` @@ -5437,6 +5628,7 @@ type OperationWarnings struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -5482,7 +5674,7 @@ type OperationWarningsData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -5554,7 +5746,7 @@ type OperationList struct { // identifier is defined by the server. Id string `json:"id,omitempty"` - // Items: [Output Only] The Operation resources. + // Items: [Output Only] A list of Operation resources. Items []*Operation `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#operations for @@ -5622,6 +5814,7 @@ type OperationsScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -5667,7 +5860,7 @@ type OperationsScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -5695,9 +5888,15 @@ func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) { // BackendService from the longest-matched rule will serve the URL. If // no rule was matched, the default service will be used. type PathMatcher struct { - // DefaultService: The URL to the BackendService resource. This will be - // used if none of the pathRules defined by this PathMatcher is met by - // the URL's path portion. + // DefaultService: The full or partial URL to the BackendService + // resource. This will be used if none of the pathRules defined by this + // PathMatcher is matched by the URL's path portion. 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 DefaultService string `json:"defaultService,omitempty"` // Description: An optional description of this resource. Provide this @@ -5754,8 +5953,8 @@ func (s *PathRule) MarshalJSON() ([]byte, error) { } // Project: A Project resource. Projects can only be created in the -// Google Developers Console. Unless marked otherwise, values can only -// be modified in the console. +// Google Cloud Platform Console. Unless marked otherwise, values can +// only be modified in the console. type Project struct { // CommonInstanceMetadata: Metadata key/value pairs available to all // instances contained in this project. See Custom metadata for more @@ -5791,8 +5990,8 @@ type Project struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // UsageExportLocation: The location in Cloud Storage and naming method - // of the daily usage report. + // UsageExportLocation: The naming prefix for daily usage reports and + // the Google Cloud Storage bucket where they are stored. UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5823,6 +6022,7 @@ type Quota struct { // Metric: [Output Only] Name of the quota metric. // // Possible values: + // "AUTOSCALERS" // "BACKEND_SERVICES" // "CPUS" // "DISKS_TOTAL_GB" @@ -5842,6 +6042,7 @@ type Quota struct { // "SSD_TOTAL_GB" // "SSL_CERTIFICATES" // "STATIC_ADDRESSES" + // "SUBNETWORKS" // "TARGET_HTTPS_PROXIES" // "TARGET_HTTP_PROXIES" // "TARGET_INSTANCES" @@ -5992,21 +6193,24 @@ func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// Route: The route resource. A Route is a rule that specifies how -// certain packets should be handled by the virtual network. Routes are -// associated with instances by tag and the set of Routes for a -// particular instance is called its routing table. For each packet -// leaving a instance, the system searches that instance's routing table -// for a single best matching Route. Routes match packets by destination -// IP address, preferring smaller or more specific ranges over larger -// ones. If there is a tie, the system selects the Route with the -// smallest priority value. If there is still a tie, it uses the layer -// three and four packet headers to select just one of the remaining -// matching Routes. The packet is then forwarded as specified by the -// nextHop field of the winning Route -- either to another instance -// destination, a instance gateway or a Google Compute Engien-operated -// gateway. Packets that do not match any Route in the sending -// instance's routing table are dropped. +// Route: Represents a Route resource. A route specifies how certain +// packets should be handled by the network. Routes are associated with +// instances by tags and the set of routes for a particular instance is +// called its routing table. +// +// For each packet leaving a instance, the system searches that +// instance's routing table for a single best matching route. Routes +// match packets by destination IP address, preferring smaller or more +// specific ranges over larger ones. If there is a tie, the system +// selects the route with the smallest priority value. If there is still +// a tie, it uses the layer three and four packet headers to select just +// one of the remaining matching routes. The packet is then forwarded as +// specified by the nextHop field of the winning route - either to +// another instance destination, a instance gateway or a Google Compute +// Engine-operated gateway. +// +// Packets that do not match any route in the sending instance's routing +// table are dropped. type Route struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -6028,7 +6232,7 @@ type Route struct { // Route resources. Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource + // Name: Name of the resource. Provided by the client when the resource // is created. 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 @@ -6042,12 +6246,13 @@ type Route struct { Network string `json:"network,omitempty"` // NextHopGateway: The URL to a gateway that should handle matching - // packets. Currently, this is only the internet gateway: + // packets. You can only specify the internet gateway using a full or + // partial valid URL: // projects//global/gateways/default-internet-gateway NextHopGateway string `json:"nextHopGateway,omitempty"` - // NextHopInstance: The fully-qualified URL to an instance that should - // handle matching packets. For + // 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/ @@ -6065,9 +6270,11 @@ type Route struct { // packets. NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"` - // Priority: Breaks ties between Routes of equal specificity. Routes - // with smaller values win when tied with routes with larger values. - // Default value is 1000. A valid range is between 0 and 65535. + // 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 the case of two routes with equal prefix length, the one + // with the lowest-numbered priority value wins. Default value is 1000. + // Valid range is 0 through 65535. Priority int64 `json:"priority,omitempty"` // SelfLink: [Output Only] Server-defined fully-qualified URL for this @@ -6106,6 +6313,7 @@ type RouteWarnings struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -6151,7 +6359,7 @@ type RouteWarningsData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -6175,13 +6383,13 @@ func (s *RouteWarningsData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// RouteList: Contains a list of route resources. +// 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: [Output Only] A list of Route resources. Items []*Route `json:"items,omitempty"` // Kind: Type of resource. @@ -6229,7 +6437,8 @@ type Scheduling struct { // OnHostMaintenance: Defines the maintenance behavior for this // instance. For standard instances, the default behavior is MIGRATE. // For preemptible instances, the default and only possible behavior is - // TERMINATE. For more information, see Setting maintenance behavior. + // TERMINATE. For more information, see Setting Instance Scheduling + // Options. // // Possible values: // "MIGRATE" @@ -6263,7 +6472,7 @@ type SerialPortOutput struct { // compute#serialPortOutput for serial port output. Kind string `json:"kind,omitempty"` - // SelfLink: [Output Only] Server defined URL for the resource. + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -6330,7 +6539,9 @@ type Snapshot struct { // Snapshot resources. Kind string `json:"kind,omitempty"` - // Licenses: Public visible licenses. + // 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"` // Name: Name of the resource; provided by the client when the resource @@ -6345,7 +6556,8 @@ type Snapshot struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // SourceDisk: The source disk used to create this snapshot. + // SourceDisk: [Output Only] The source disk used to create this + // snapshot. SourceDisk string `json:"sourceDisk,omitempty"` // SourceDiskId: [Output Only] The ID value of the disk used to create @@ -6354,7 +6566,8 @@ type Snapshot struct { // disk name. SourceDiskId string `json:"sourceDiskId,omitempty"` - // Status: [Output Only] The status of the snapshot. + // Status: [Output Only] The status of the snapshot. This can be + // CREATING, DELETING, FAILED, READY, or UPLOADING. // // Possible values: // "CREATING" @@ -6371,7 +6584,9 @@ type Snapshot struct { // StorageBytesStatus: [Output Only] An indicator whether storageBytes // is in a stable state or it is being adjusted as a result of shared - // storage reallocation. + // 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" @@ -6403,7 +6618,7 @@ type SnapshotList struct { // identifier is defined by the server. Id string `json:"id,omitempty"` - // Items: A list of Snapshot resources. + // Items: [Output Only] A list of Snapshot resources. Items []*Snapshot `json:"items,omitempty"` // Kind: Type of resource. @@ -6440,8 +6655,8 @@ func (s *SnapshotList) MarshalJSON() ([]byte, error) { } // SslCertificate: An SslCertificate resource. This resource provides a -// mechanism to upload an SSL key and certificate to global HTTPS -// loadbalancer to serve secure connections. +// mechanism to upload an SSL key and certificate to the load balancer +// to serve secure connections from the user. type SslCertificate struct { // Certificate: A local certificate file. The certificate must be in PEM // format. The certificate chain must be no greater than 5 certs long. @@ -6541,6 +6756,259 @@ func (s *SslCertificateList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +// Subnetwork: A Subnetwork resource. +type Subnetwork struct { + // 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"` + + // 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"` + + // 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 192.168.0.0/16. Ranges must be unique and + // non-overlapping within a network. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#subnetwork + // for Subnetwork resources. + Kind string `json:"kind,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 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"` + + // Network: The URL of the network to which this subnetwork belongs, + // provided by the client when initially creating the subnetwork. Only + // networks that are in the distributed mode can have subnetworks. + Network string `json:"network,omitempty"` + + // Region: URL of the region where the Subnetwork 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. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *Subnetwork) MarshalJSON() ([]byte, error) { + type noMethod Subnetwork + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +type SubnetworkAggregatedList 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 map of scoped Subnetwork lists. + Items map[string]SubnetworksScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#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 + // 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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { + type noMethod SubnetworkAggregatedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +// SubnetworkList: Contains a list of Subnetwork resources. +type SubnetworkList struct { + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id string `json:"id,omitempty"` + + // Items: The 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 + // 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"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *SubnetworkList) MarshalJSON() ([]byte, error) { + type noMethod SubnetworkList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +type SubnetworksScopedList struct { + // Subnetworks: 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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) { + type noMethod SubnetworksScopedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +// 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" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" + Code string `json:"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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) { + type noMethod SubnetworksScopedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod SubnetworksScopedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + // Tags: A set of instance tags. type Tags struct { // Fingerprint: Specifies a fingerprint for this request, which is @@ -6591,7 +7059,7 @@ type TargetHttpProxy struct { // for target HTTP proxies. Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource + // Name: Name of the resource. Provided by the client when the resource // is created. 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 @@ -6636,7 +7104,7 @@ type TargetHttpProxyList struct { Items []*TargetHttpProxy `json:"items,omitempty"` // Kind: Type of resource. Always compute#targetHttpProxyList for lists - // of Target HTTP proxies. + // of target HTTP proxies. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -6670,9 +7138,9 @@ func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) { } type TargetHttpsProxiesSetSslCertificatesRequest struct { - // SslCertificates: New set of URLs to SslCertificate resources to - // associate with this TargetHttpProxy. Currently exactly one ssl - // certificate must be specified. + // SslCertificates: New set of SslCertificate resources to associate + // with this TargetHttpsProxy resource. Currently exactly one + // SslCertificate resource must be specified. SslCertificates []string `json:"sslCertificates,omitempty"` // ForceSendFields is a list of field names (e.g. "SslCertificates") to @@ -6705,8 +7173,8 @@ type TargetHttpsProxy struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always - // compute#targetHttpsProxy for target HTTPS proxies. + // Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy + // for target HTTPS proxies. Kind string `json:"kind,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -6722,12 +7190,17 @@ type TargetHttpsProxy struct { SelfLink string `json:"selfLink,omitempty"` // SslCertificates: URLs to SslCertificate resources that are used to - // authenticate connections to Backends. Currently exactly one SSL - // certificate must be specified. + // authenticate connections between users and the load balancer. + // Currently, exactly one SSL certificate must be specified. SslCertificates []string `json:"sslCertificates,omitempty"` - // UrlMap: URL to the UrlMap resource that defines the mapping from URL - // to the BackendService. + // 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 @@ -6758,7 +7231,8 @@ type TargetHttpsProxyList struct { // Items: A list of TargetHttpsProxy resources. Items []*TargetHttpsProxy `json:"items,omitempty"` - // Kind: Type of resource. + // 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 @@ -6806,8 +7280,14 @@ type TargetInstance struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Instance: The URL to the instance that terminates the relevant - // traffic. + // 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. Always @@ -6970,6 +7450,7 @@ type TargetInstancesScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -7015,7 +7496,7 @@ type TargetInstancesScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -7041,7 +7522,7 @@ func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) { // TargetPool: A TargetPool resource. This resource defines a pool of // instances, associated HttpHealthCheck resources, and the fallback -// TargetPool. +// target pool. type TargetPool struct { // BackupPool: This field is applicable only when the containing target // pool is serving a forwarding rule as the primary pool, and its @@ -7096,7 +7577,7 @@ type TargetPool struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Instances: A list of resource URLs to the member virtual machines + // 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"` @@ -7162,10 +7643,12 @@ type TargetPoolAggregatedList struct { // server. Id string `json:"id,omitempty"` - // Items: A map of scoped target pool lists. + // Items: [Output Only] A map of scoped target pool lists. Items map[string]TargetPoolsScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#targetPoolAggregatedList for aggregated lists of target + // pools. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -7201,7 +7684,9 @@ func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) { type TargetPoolInstanceHealth struct { HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#targetPoolInstanceHealth when checking the health of an + // instance. Kind string `json:"kind,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -7232,7 +7717,8 @@ type TargetPoolList struct { // Items: A list of TargetPool resources. Items []*TargetPool `json:"items,omitempty"` - // Kind: Type of resource. + // 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 @@ -7266,7 +7752,8 @@ func (s *TargetPoolList) MarshalJSON() ([]byte, error) { } type TargetPoolsAddHealthCheckRequest struct { - // HealthChecks: Health check URLs to be added to targetPool. + // HealthChecks: A list of HttpHealthCheck resources to add to the + // target pool. HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` // ForceSendFields is a list of field names (e.g. "HealthChecks") to @@ -7285,7 +7772,13 @@ func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) { } type TargetPoolsAddInstanceRequest struct { - // Instances: URLs of the instances to be added to targetPool. + // 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 @@ -7304,7 +7797,12 @@ func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) { } type TargetPoolsRemoveHealthCheckRequest struct { - // HealthChecks: Health check URLs to be removed from targetPool. + // 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 @@ -7323,7 +7821,7 @@ func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) { } type TargetPoolsRemoveInstanceRequest struct { - // Instances: URLs of the instances to be removed from targetPool. + // 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 @@ -7372,6 +7870,7 @@ type TargetPoolsScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -7417,7 +7916,7 @@ type TargetPoolsScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -7459,6 +7958,7 @@ func (s *TargetReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +// TargetVpnGateway: Represents a Target VPN gateway resource. type TargetVpnGateway struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -7481,7 +7981,7 @@ type TargetVpnGateway struct { // for target VPN gateways. Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource + // Name: Name of the resource. Provided by the client when the resource // is created. 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 @@ -7511,8 +8011,8 @@ type TargetVpnGateway struct { Status string `json:"status,omitempty"` // Tunnels: [Output Only] A list of URLs to VpnTunnel resources. - // VpnTunnels are created using compute.vpntunnels.insert and associated - // to a VPN gateway. + // VpnTunnels are created using compute.vpntunnels.insert method and + // associated to a VPN gateway. Tunnels []string `json:"tunnels,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -7651,6 +8151,7 @@ type TargetVpnGatewaysScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -7696,7 +8197,7 @@ type TargetVpnGatewaysScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -7793,7 +8294,7 @@ type UrlMap struct { SelfLink string `json:"selfLink,omitempty"` // Tests: The list of expected URL mappings. Request to update this - // UrlMap will succeed only all of the test cases pass. + // UrlMap will succeed only if all of the test cases pass. Tests []*UrlMapTest `json:"tests,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -7983,8 +8484,10 @@ func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) { 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 is just the bucket name, with no - // gs:// or https://storage.googleapis.com/ in front of it. + // write access to this bucket. This can either be the bucket name by + // itself, such as example-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 @@ -8036,7 +8539,13 @@ type VpnTunnel struct { // VPN tunnels. Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource + // LocalTrafficSelector: Local traffic selector to use when establishing + // the VPN tunnel with peer VPN gateway. The value should be a CIDR + // formatted string, for example: 192.168.0.0/16. The ranges should be + // disjoint. + 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 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 @@ -8055,7 +8564,7 @@ type VpnTunnel struct { SelfLink string `json:"selfLink,omitempty"` // SharedSecret: Shared secret used to set the secure session between - // the GCE VPN gateway and the peer VPN gateway. + // the Cloud VPN gateway and the peer VPN gateway. SharedSecret string `json:"sharedSecret,omitempty"` // SharedSecretHash: Hash of the shared secret. @@ -8064,6 +8573,7 @@ type VpnTunnel struct { // Status: [Output Only] The status of the VPN tunnel. // // Possible values: + // "ALLOCATING_RESOURCES" // "AUTHORIZATION_ERROR" // "DEPROVISIONING" // "ESTABLISHED" @@ -8077,8 +8587,8 @@ type VpnTunnel struct { // "WAITING_FOR_FULL_CONFIG" Status string `json:"status,omitempty"` - // TargetVpnGateway: URL of the VPN gateway to which this VPN tunnel is - // associated. Provided by the client when the VPN tunnel is created. + // TargetVpnGateway: URL of the VPN gateway with which this VPN tunnel + // is associated. Provided by the client when the VPN tunnel is created. TargetVpnGateway string `json:"targetVpnGateway,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -8216,6 +8726,7 @@ type VpnTunnelsScopedListWarning struct { // the response. // // Possible values: + // "CLEANUP_FAILED" // "DEPRECATED_RESOURCE_USED" // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" // "INJECTED_KERNELS_DEPRECATED" @@ -8261,7 +8772,7 @@ type VpnTunnelsScopedListWarningData struct { // being returned. For example, for warnings where there are no results // in a list request for a particular zone, this key might be scope and // the key value might be the zone name. Other examples might be a key - // indicating a deprecated resource, and a suggested replacement, or a + // indicating a deprecated resource and a suggested replacement, or a // warning about invalid network settings (for example, if an instance // attempts to perform IP forwarding but is not enabled for IP // forwarding). @@ -8306,12 +8817,6 @@ type Zone struct { // zones. Kind string `json:"kind,omitempty"` - // MaintenanceWindows: [Output Only] Any scheduled maintenance windows - // for this zone. When the zone is in a maintenance window, all - // resources which reside in the zone will be unavailable. For more - // information, see Maintenance Windows - MaintenanceWindows []*ZoneMaintenanceWindows `json:"maintenanceWindows,omitempty"` - // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` @@ -8348,37 +8853,6 @@ func (s *Zone) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -type ZoneMaintenanceWindows struct { - // BeginTime: [Output Only] Starting time of the maintenance window, in - // RFC3339 format. - BeginTime string `json:"beginTime,omitempty"` - - // Description: [Output Only] Textual description of the maintenance - // window. - Description string `json:"description,omitempty"` - - // EndTime: [Output Only] Ending time of the maintenance window, in - // RFC3339 format. - EndTime string `json:"endTime,omitempty"` - - // Name: [Output Only] Name of the maintenance window. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BeginTime") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` -} - -func (s *ZoneMaintenanceWindows) MarshalJSON() ([]byte, error) { - type noMethod ZoneMaintenanceWindows - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) -} - // ZoneList: Contains a list of zone resources. type ZoneList struct { // Id: [Output Only] Unique identifier for the resource; defined by the @@ -8431,7 +8905,7 @@ type AddressesAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of addresses grouped by scope. +// AggregatedList: Retrieves an aggregated list of addresses. // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -8453,19 +8927,20 @@ func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedLi // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -8473,10 +8948,10 @@ func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregated } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -8490,23 +8965,6 @@ func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggr return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AddressesAggregatedListCall) QuotaUser(quotaUser string) *AddressesAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AddressesAggregatedListCall) UserIP(userIP string) *AddressesAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -8559,7 +9017,8 @@ func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, err // returned 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() (*AddressAggregatedList, error) { +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 { @@ -8588,7 +9047,7 @@ func (c *AddressesAggregatedListCall) Do() (*AddressAggregatedList, error) { } return ret, nil // { - // "description": "Retrieves the list of addresses grouped by scope.", + // "description": "Retrieves an aggregated list of addresses.", // "httpMethod": "GET", // "id": "compute.addresses.aggregatedList", // "parameterOrder": [ @@ -8596,13 +9055,13 @@ func (c *AddressesAggregatedListCall) Do() (*AddressAggregatedList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -8635,6 +9094,27 @@ func (c *AddressesAggregatedListCall) Do() (*AddressAggregatedList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.addresses.delete": type AddressesDeleteCall struct { @@ -8656,23 +9136,6 @@ func (r *AddressesService) Delete(project string, region string, address string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AddressesDeleteCall) QuotaUser(quotaUser string) *AddressesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AddressesDeleteCall) UserIP(userIP string) *AddressesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -8714,7 +9177,8 @@ func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -8767,7 +9231,7 @@ func (c *AddressesDeleteCall) Do() (*Operation, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -8808,23 +9272,6 @@ func (r *AddressesService) Get(project string, region string, address string) *A return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AddressesGetCall) QuotaUser(quotaUser string) *AddressesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AddressesGetCall) UserIP(userIP string) *AddressesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -8879,7 +9326,8 @@ func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *AddressesGetCall) Do() (*Address, error) { +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 { @@ -8932,7 +9380,7 @@ func (c *AddressesGetCall) Do() (*Address, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -8974,23 +9422,6 @@ func (r *AddressesService) Insert(project string, region string, address *Addres return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AddressesInsertCall) QuotaUser(quotaUser string) *AddressesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AddressesInsertCall) UserIP(userIP string) *AddressesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9037,7 +9468,8 @@ func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -9082,7 +9514,7 @@ func (c *AddressesInsertCall) Do() (*Operation, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -9115,8 +9547,8 @@ type AddressesListCall struct { ctx_ context.Context } -// List: Retrieves the list of address resources contained within the -// specified region. +// List: Retrieves a list of addresses contained within the specified +// region. // For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list func (r *AddressesService) List(project string, region string) *AddressesListCall { c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -9139,19 +9571,20 @@ func (r *AddressesService) List(project string, region string) *AddressesListCal // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *AddressesListCall) Filter(filter string) *AddressesListCall { c.urlParams_.Set("filter", filter) @@ -9159,10 +9592,10 @@ func (c *AddressesListCall) Filter(filter string) *AddressesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -9176,23 +9609,6 @@ func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AddressesListCall) QuotaUser(quotaUser string) *AddressesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AddressesListCall) UserIP(userIP string) *AddressesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9246,7 +9662,8 @@ func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) { // 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() (*AddressList, error) { +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 { @@ -9275,7 +9692,7 @@ func (c *AddressesListCall) Do() (*AddressList, error) { } return ret, nil // { - // "description": "Retrieves the list of address resources contained within the specified region.", + // "description": "Retrieves a list of addresses contained within the specified region.", // "httpMethod": "GET", // "id": "compute.addresses.list", // "parameterOrder": [ @@ -9284,13 +9701,13 @@ func (c *AddressesListCall) Do() (*AddressList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -9310,7 +9727,7 @@ func (c *AddressesListCall) Do() (*AddressList, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -9330,6 +9747,27 @@ func (c *AddressesListCall) Do() (*AddressList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.autoscalers.aggregatedList": type AutoscalersAggregatedListCall struct { @@ -9340,7 +9778,7 @@ type AutoscalersAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of autoscalers grouped by scope. +// AggregatedList: Retrieves an aggregated list of autoscalers. func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall { c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -9361,19 +9799,20 @@ func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregat // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -9381,10 +9820,10 @@ func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggreg } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -9398,23 +9837,6 @@ func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *Autoscalers return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AutoscalersAggregatedListCall) QuotaUser(quotaUser string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AutoscalersAggregatedListCall) UserIP(userIP string) *AutoscalersAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9467,7 +9889,8 @@ func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, e // returned 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() (*AutoscalerAggregatedList, error) { +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 { @@ -9496,7 +9919,7 @@ func (c *AutoscalersAggregatedListCall) Do() (*AutoscalerAggregatedList, error) } return ret, nil // { - // "description": "Retrieves the list of autoscalers grouped by scope.", + // "description": "Retrieves an aggregated list of autoscalers.", // "httpMethod": "GET", // "id": "compute.autoscalers.aggregatedList", // "parameterOrder": [ @@ -9504,13 +9927,13 @@ func (c *AutoscalersAggregatedListCall) Do() (*AutoscalerAggregatedList, error) // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -9543,6 +9966,27 @@ func (c *AutoscalersAggregatedListCall) Do() (*AutoscalerAggregatedList, error) } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.autoscalers.delete": type AutoscalersDeleteCall struct { @@ -9554,7 +9998,7 @@ type AutoscalersDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified autoscaler resource. +// Delete: Deletes the specified autoscaler. func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall { c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -9563,23 +10007,6 @@ func (r *AutoscalersService) Delete(project string, zone string, autoscaler stri return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AutoscalersDeleteCall) QuotaUser(quotaUser string) *AutoscalersDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AutoscalersDeleteCall) UserIP(userIP string) *AutoscalersDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9621,7 +10048,8 @@ func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -9650,7 +10078,7 @@ func (c *AutoscalersDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified autoscaler resource.", + // "description": "Deletes the specified autoscaler.", // "httpMethod": "DELETE", // "id": "compute.autoscalers.delete", // "parameterOrder": [ @@ -9660,7 +10088,7 @@ func (c *AutoscalersDeleteCall) Do() (*Operation, error) { // ], // "parameters": { // "autoscaler": { - // "description": "Name of the persistent autoscaler resource to delete.", + // "description": "Name of the autoscaler to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -9674,7 +10102,7 @@ func (c *AutoscalersDeleteCall) Do() (*Operation, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -9705,7 +10133,8 @@ type AutoscalersGetCall struct { ctx_ context.Context } -// Get: Returns the specified autoscaler resource. +// Get: Returns the specified autoscaler resource. Get a list of +// available autoscalers by making a list() request. func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall { c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -9714,23 +10143,6 @@ func (r *AutoscalersService) Get(project string, zone string, autoscaler string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AutoscalersGetCall) QuotaUser(quotaUser string) *AutoscalersGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AutoscalersGetCall) UserIP(userIP string) *AutoscalersGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9785,7 +10197,8 @@ func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*Autoscaler, error) { +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 { @@ -9814,7 +10227,7 @@ func (c *AutoscalersGetCall) Do() (*Autoscaler, error) { } return ret, nil // { - // "description": "Returns the specified autoscaler resource.", + // "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.", // "httpMethod": "GET", // "id": "compute.autoscalers.get", // "parameterOrder": [ @@ -9824,7 +10237,7 @@ func (c *AutoscalersGetCall) Do() (*Autoscaler, error) { // ], // "parameters": { // "autoscaler": { - // "description": "Name of the persistent autoscaler resource to return.", + // "description": "Name of the autoscaler to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -9838,7 +10251,7 @@ func (c *AutoscalersGetCall) Do() (*Autoscaler, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -9869,8 +10282,8 @@ type AutoscalersInsertCall struct { ctx_ context.Context } -// Insert: Creates an autoscaler resource in the specified project using -// the data included in the request. +// Insert: Creates an autoscaler in the specified project using the data +// included in the request. func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall { c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -9879,23 +10292,6 @@ func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Aut return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AutoscalersInsertCall) QuotaUser(quotaUser string) *AutoscalersInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AutoscalersInsertCall) UserIP(userIP string) *AutoscalersInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -9942,7 +10338,8 @@ func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -9971,7 +10368,7 @@ func (c *AutoscalersInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates an autoscaler resource in the specified project using the data included in the request.", + // "description": "Creates an autoscaler in the specified project using the data included in the request.", // "httpMethod": "POST", // "id": "compute.autoscalers.insert", // "parameterOrder": [ @@ -9987,7 +10384,7 @@ func (c *AutoscalersInsertCall) Do() (*Operation, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -10020,8 +10417,8 @@ type AutoscalersListCall struct { ctx_ context.Context } -// List: Retrieves the list of autoscaler resources contained within the -// specified zone. +// List: Retrieves a list of autoscalers contained within the specified +// zone. func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -10043,19 +10440,20 @@ func (r *AutoscalersService) List(project string, zone string) *AutoscalersListC // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { c.urlParams_.Set("filter", filter) @@ -10063,10 +10461,10 @@ func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -10080,23 +10478,6 @@ func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AutoscalersListCall) QuotaUser(quotaUser string) *AutoscalersListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AutoscalersListCall) UserIP(userIP string) *AutoscalersListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10150,7 +10531,8 @@ func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) { // 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() (*AutoscalerList, error) { +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 { @@ -10179,7 +10561,7 @@ func (c *AutoscalersListCall) Do() (*AutoscalerList, error) { } return ret, nil // { - // "description": "Retrieves the list of autoscaler resources contained within the specified zone.", + // "description": "Retrieves a list of autoscalers contained within the specified zone.", // "httpMethod": "GET", // "id": "compute.autoscalers.list", // "parameterOrder": [ @@ -10188,13 +10570,13 @@ func (c *AutoscalersListCall) Do() (*AutoscalerList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -10214,7 +10596,7 @@ func (c *AutoscalersListCall) Do() (*AutoscalerList, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -10234,6 +10616,27 @@ func (c *AutoscalersListCall) Do() (*AutoscalerList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.autoscalers.patch": type AutoscalersPatchCall struct { @@ -10245,9 +10648,8 @@ type AutoscalersPatchCall struct { ctx_ context.Context } -// Patch: Updates an autoscaler resource in the specified project using -// the data included in the request. This method supports patch -// semantics. +// Patch: Updates an autoscaler in the specified project using the data +// included in the request. This method supports patch semantics. func (r *AutoscalersService) Patch(project string, zone string, autoscaler string, autoscaler2 *Autoscaler) *AutoscalersPatchCall { c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -10257,23 +10659,6 @@ func (r *AutoscalersService) Patch(project string, zone string, autoscaler strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AutoscalersPatchCall) QuotaUser(quotaUser string) *AutoscalersPatchCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AutoscalersPatchCall) UserIP(userIP string) *AutoscalersPatchCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10320,7 +10705,8 @@ func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -10349,7 +10735,7 @@ func (c *AutoscalersPatchCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Updates an autoscaler resource in the specified project using the data included in the request. This method supports patch semantics.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.", // "httpMethod": "PATCH", // "id": "compute.autoscalers.patch", // "parameterOrder": [ @@ -10359,7 +10745,7 @@ func (c *AutoscalersPatchCall) Do() (*Operation, error) { // ], // "parameters": { // "autoscaler": { - // "description": "Name of the autoscaler resource to update.", + // "description": "Name of the autoscaler to update.", // "location": "query", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -10373,7 +10759,7 @@ func (c *AutoscalersPatchCall) Do() (*Operation, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -10406,8 +10792,8 @@ type AutoscalersUpdateCall struct { ctx_ context.Context } -// Update: Updates an autoscaler resource in the specified project using -// the data included in the request. +// Update: Updates an autoscaler in the specified project using the data +// included in the request. func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall { c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -10417,29 +10803,12 @@ func (r *AutoscalersService) Update(project string, zone string, autoscaler *Aut } // Autoscaler sets the optional parameter "autoscaler": Name of the -// autoscaler resource to update. +// autoscaler to update. func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall { c.urlParams_.Set("autoscaler", autoscaler) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *AutoscalersUpdateCall) QuotaUser(quotaUser string) *AutoscalersUpdateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *AutoscalersUpdateCall) UserIP(userIP string) *AutoscalersUpdateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10486,7 +10855,8 @@ func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -10515,7 +10885,7 @@ func (c *AutoscalersUpdateCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Updates an autoscaler resource in the specified project using the data included in the request.", + // "description": "Updates an autoscaler in the specified project using the data included in the request.", // "httpMethod": "PUT", // "id": "compute.autoscalers.update", // "parameterOrder": [ @@ -10524,7 +10894,7 @@ func (c *AutoscalersUpdateCall) Do() (*Operation, error) { // ], // "parameters": { // "autoscaler": { - // "description": "Name of the autoscaler resource to update.", + // "description": "Name of the autoscaler to update.", // "location": "query", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "type": "string" @@ -10537,7 +10907,7 @@ func (c *AutoscalersUpdateCall) Do() (*Operation, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -10578,23 +10948,6 @@ func (r *BackendServicesService) Delete(project string, backendService string) * return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *BackendServicesDeleteCall) QuotaUser(quotaUser string) *BackendServicesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *BackendServicesDeleteCall) UserIP(userIP string) *BackendServicesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10635,7 +10988,8 @@ func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -10710,7 +11064,8 @@ type BackendServicesGetCall struct { ctx_ context.Context } -// Get: Returns the specified BackendService resource. +// Get: Returns the specified BackendService resource. Get a list of +// available backend services by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -10719,23 +11074,6 @@ func (r *BackendServicesService) Get(project string, backendService string) *Bac return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *BackendServicesGetCall) QuotaUser(quotaUser string) *BackendServicesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *BackendServicesGetCall) UserIP(userIP string) *BackendServicesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10789,7 +11127,8 @@ func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*BackendService, error) { +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 { @@ -10818,7 +11157,7 @@ func (c *BackendServicesGetCall) Do() (*BackendService, error) { } return ret, nil // { - // "description": "Returns the specified BackendService resource.", + // "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.", // "httpMethod": "GET", // "id": "compute.backendServices.get", // "parameterOrder": [ @@ -10876,23 +11215,6 @@ func (r *BackendServicesService) GetHealth(project string, backendService string return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *BackendServicesGetHealthCall) QuotaUser(quotaUser string) *BackendServicesGetHealthCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *BackendServicesGetHealthCall) UserIP(userIP string) *BackendServicesGetHealthCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10939,7 +11261,8 @@ func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, er // was returned 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() (*BackendServiceGroupHealth, error) { +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 { @@ -11017,7 +11340,9 @@ type BackendServicesInsertCall struct { } // Insert: Creates a BackendService resource in the specified project -// using the data included in the request. +// using the data included in the request. There are several +// restrictions and guidelines to keep in mind when creating a backend +// service. Read Restrictions and Guidelines for more information. // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11026,23 +11351,6 @@ func (r *BackendServicesService) Insert(project string, backendservice *BackendS return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *BackendServicesInsertCall) QuotaUser(quotaUser string) *BackendServicesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *BackendServicesInsertCall) UserIP(userIP string) *BackendServicesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -11088,7 +11396,8 @@ func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -11117,7 +11426,7 @@ func (c *BackendServicesInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a BackendService resource in the specified project using the data included in the request.", + // "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.", // "httpMethod": "POST", // "id": "compute.backendServices.insert", // "parameterOrder": [ @@ -11180,19 +11489,20 @@ func (r *BackendServicesService) List(project string) *BackendServicesListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { c.urlParams_.Set("filter", filter) @@ -11200,10 +11510,10 @@ func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -11217,23 +11527,6 @@ func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesLi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *BackendServicesListCall) QuotaUser(quotaUser string) *BackendServicesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *BackendServicesListCall) UserIP(userIP string) *BackendServicesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -11286,7 +11579,8 @@ func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) // returned 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() (*BackendServiceList, error) { +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 { @@ -11323,13 +11617,13 @@ func (c *BackendServicesListCall) Do() (*BackendServiceList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -11362,6 +11656,27 @@ func (c *BackendServicesListCall) Do() (*BackendServiceList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.backendServices.patch": type BackendServicesPatchCall struct { @@ -11373,8 +11688,10 @@ type BackendServicesPatchCall struct { ctx_ context.Context } -// Patch: Update the entire content of the BackendService resource. This -// method supports patch semantics. +// Patch: Updates the entire content of the BackendService resource. +// There are several restrictions and guidelines to keep in mind when +// updating a backend service. Read Restrictions and Guidelines for +// more information. This method supports patch semantics. // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11384,23 +11701,6 @@ func (r *BackendServicesService) Patch(project string, backendService string, ba return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *BackendServicesPatchCall) QuotaUser(quotaUser string) *BackendServicesPatchCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *BackendServicesPatchCall) UserIP(userIP string) *BackendServicesPatchCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -11447,7 +11747,8 @@ func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -11476,7 +11777,7 @@ func (c *BackendServicesPatchCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Update the entire content of the BackendService resource. This method supports patch semantics.", + // "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", // "httpMethod": "PATCH", // "id": "compute.backendServices.patch", // "parameterOrder": [ @@ -11525,7 +11826,10 @@ type BackendServicesUpdateCall struct { ctx_ context.Context } -// Update: Update the entire content of the BackendService resource. +// Update: Updates the entire content of the BackendService resource. +// There are several restrictions and guidelines to keep in mind when +// updating a backend service. Read Restrictions and Guidelines for +// more information. // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11535,23 +11839,6 @@ func (r *BackendServicesService) Update(project string, backendService string, b return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *BackendServicesUpdateCall) QuotaUser(quotaUser string) *BackendServicesUpdateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *BackendServicesUpdateCall) UserIP(userIP string) *BackendServicesUpdateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -11598,7 +11885,8 @@ func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -11627,7 +11915,7 @@ func (c *BackendServicesUpdateCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Update the entire content of the BackendService resource.", + // "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.", // "httpMethod": "PUT", // "id": "compute.backendServices.update", // "parameterOrder": [ @@ -11675,8 +11963,7 @@ type DiskTypesAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of disk type resources grouped by -// scope. +// AggregatedList: Retrieves an aggregated list of disk types. // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11698,19 +11985,20 @@ func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedLi // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -11718,10 +12006,10 @@ func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregated } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -11735,23 +12023,6 @@ func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggr return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DiskTypesAggregatedListCall) QuotaUser(quotaUser string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DiskTypesAggregatedListCall) UserIP(userIP string) *DiskTypesAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -11804,7 +12075,8 @@ func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, err // returned 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() (*DiskTypeAggregatedList, error) { +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 { @@ -11833,7 +12105,7 @@ func (c *DiskTypesAggregatedListCall) Do() (*DiskTypeAggregatedList, error) { } return ret, nil // { - // "description": "Retrieves the list of disk type resources grouped by scope.", + // "description": "Retrieves an aggregated list of disk types.", // "httpMethod": "GET", // "id": "compute.diskTypes.aggregatedList", // "parameterOrder": [ @@ -11841,13 +12113,13 @@ func (c *DiskTypesAggregatedListCall) Do() (*DiskTypeAggregatedList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -11880,6 +12152,27 @@ func (c *DiskTypesAggregatedListCall) Do() (*DiskTypeAggregatedList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.diskTypes.get": type DiskTypesGetCall struct { @@ -11892,7 +12185,8 @@ type DiskTypesGetCall struct { ctx_ context.Context } -// Get: Returns the specified disk type resource. +// Get: Returns the specified disk type. Get a list of available disk +// types by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11902,23 +12196,6 @@ func (r *DiskTypesService) Get(project string, zone string, diskType string) *Di return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DiskTypesGetCall) QuotaUser(quotaUser string) *DiskTypesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DiskTypesGetCall) UserIP(userIP string) *DiskTypesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -11973,7 +12250,8 @@ func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*DiskType, error) { +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 { @@ -12002,7 +12280,7 @@ func (c *DiskTypesGetCall) Do() (*DiskType, error) { } return ret, nil // { - // "description": "Returns the specified disk type resource.", + // "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.", // "httpMethod": "GET", // "id": "compute.diskTypes.get", // "parameterOrder": [ @@ -12012,7 +12290,7 @@ func (c *DiskTypesGetCall) Do() (*DiskType, error) { // ], // "parameters": { // "diskType": { - // "description": "Name of the disk type resource to return.", + // "description": "Name of the disk type to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -12057,8 +12335,8 @@ type DiskTypesListCall struct { ctx_ context.Context } -// List: Retrieves the list of disk type resources available to the -// specified project. +// List: Retrieves a list of disk types available to the specified +// project. // For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12081,19 +12359,20 @@ func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { c.urlParams_.Set("filter", filter) @@ -12101,10 +12380,10 @@ func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -12118,23 +12397,6 @@ func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DiskTypesListCall) QuotaUser(quotaUser string) *DiskTypesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DiskTypesListCall) UserIP(userIP string) *DiskTypesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -12188,7 +12450,8 @@ func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) { // 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() (*DiskTypeList, error) { +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 { @@ -12217,7 +12480,7 @@ func (c *DiskTypesListCall) Do() (*DiskTypeList, error) { } return ret, nil // { - // "description": "Retrieves the list of disk type resources available to the specified project.", + // "description": "Retrieves a list of disk types available to the specified project.", // "httpMethod": "GET", // "id": "compute.diskTypes.list", // "parameterOrder": [ @@ -12226,13 +12489,13 @@ func (c *DiskTypesListCall) Do() (*DiskTypeList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -12272,6 +12535,27 @@ func (c *DiskTypesListCall) Do() (*DiskTypeList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.disks.aggregatedList": type DisksAggregatedListCall struct { @@ -12282,8 +12566,7 @@ type DisksAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of persistent disks grouped by -// scope. +// AggregatedList: Retrieves an aggregated list of persistent disks. // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12305,19 +12588,20 @@ func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -12325,10 +12609,10 @@ func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -12342,23 +12626,6 @@ func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedLi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DisksAggregatedListCall) QuotaUser(quotaUser string) *DisksAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DisksAggregatedListCall) UserIP(userIP string) *DisksAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -12411,7 +12678,8 @@ func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) // returned 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() (*DiskAggregatedList, error) { +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 { @@ -12440,7 +12708,7 @@ func (c *DisksAggregatedListCall) Do() (*DiskAggregatedList, error) { } return ret, nil // { - // "description": "Retrieves the list of persistent disks grouped by scope.", + // "description": "Retrieves an aggregated list of persistent disks.", // "httpMethod": "GET", // "id": "compute.disks.aggregatedList", // "parameterOrder": [ @@ -12448,13 +12716,13 @@ func (c *DisksAggregatedListCall) Do() (*DiskAggregatedList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -12487,6 +12755,27 @@ func (c *DisksAggregatedListCall) Do() (*DiskAggregatedList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.disks.createSnapshot": type DisksCreateSnapshotCall struct { @@ -12510,23 +12799,6 @@ func (r *DisksService) CreateSnapshot(project string, zone string, disk string, return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DisksCreateSnapshotCall) QuotaUser(quotaUser string) *DisksCreateSnapshotCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DisksCreateSnapshotCall) UserIP(userIP string) *DisksCreateSnapshotCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -12574,7 +12846,8 @@ func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -12673,23 +12946,6 @@ func (r *DisksService) Delete(project string, zone string, disk string) *DisksDe return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DisksDeleteCall) QuotaUser(quotaUser string) *DisksDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DisksDeleteCall) UserIP(userIP string) *DisksDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -12731,7 +12987,8 @@ func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -12815,7 +13072,8 @@ type DisksGetCall struct { ctx_ context.Context } -// Get: Returns a specified persistent disk. +// Get: Returns a specified persistent disk. Get a list of available +// persistent disks by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12825,23 +13083,6 @@ func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCa return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DisksGetCall) QuotaUser(quotaUser string) *DisksGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DisksGetCall) UserIP(userIP string) *DisksGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -12896,7 +13137,8 @@ func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) { // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *DisksGetCall) Do() (*Disk, error) { +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 { @@ -12925,7 +13167,7 @@ func (c *DisksGetCall) Do() (*Disk, error) { } return ret, nil // { - // "description": "Returns a specified persistent disk.", + // "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.", // "httpMethod": "GET", // "id": "compute.disks.get", // "parameterOrder": [ @@ -12981,7 +13223,10 @@ type DisksInsertCall struct { } // Insert: Creates a persistent disk in the specified project using the -// data included in the request. +// data in the request. You can create a disk with a sourceImage, a +// sourceSnapshot, 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. // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -12991,15 +13236,6 @@ func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksIns return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DisksInsertCall) QuotaUser(quotaUser string) *DisksInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // SourceImage sets the optional parameter "sourceImage": Source image // to restore onto a disk. func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { @@ -13007,14 +13243,6 @@ func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { return c } -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DisksInsertCall) UserIP(userIP string) *DisksInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -13061,7 +13289,8 @@ func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -13090,7 +13319,7 @@ func (c *DisksInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a persistent disk in the specified project using the data included in the request.", + // "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, 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.", // "httpMethod": "POST", // "id": "compute.disks.insert", // "parameterOrder": [ @@ -13144,7 +13373,7 @@ type DisksListCall struct { ctx_ context.Context } -// List: Retrieves the list of persistent disks contained within the +// List: Retrieves a list of persistent disks contained within the // specified zone. // For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list func (r *DisksService) List(project string, zone string) *DisksListCall { @@ -13168,19 +13397,20 @@ func (r *DisksService) List(project string, zone string) *DisksListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *DisksListCall) Filter(filter string) *DisksListCall { c.urlParams_.Set("filter", filter) @@ -13188,10 +13418,10 @@ func (c *DisksListCall) Filter(filter string) *DisksListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -13205,23 +13435,6 @@ func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *DisksListCall) QuotaUser(quotaUser string) *DisksListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *DisksListCall) UserIP(userIP string) *DisksListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -13275,7 +13488,8 @@ func (c *DisksListCall) doRequest(alt string) (*http.Response, error) { // 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() (*DiskList, error) { +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 { @@ -13304,7 +13518,7 @@ func (c *DisksListCall) Do() (*DiskList, error) { } return ret, nil // { - // "description": "Retrieves the list of persistent disks contained within the specified zone.", + // "description": "Retrieves a list of persistent disks contained within the specified zone.", // "httpMethod": "GET", // "id": "compute.disks.list", // "parameterOrder": [ @@ -13313,13 +13527,13 @@ func (c *DisksListCall) Do() (*DiskList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -13359,6 +13573,172 @@ func (c *DisksListCall) Do() (*DiskList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.disks.resize": + +type DisksResizeCall struct { + s *Service + project string + zone string + disk string + disksresizerequest *DisksResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context +} + +// Resize: Resizes the specified persistent disk. +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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall { + c.ctx_ = ctx + return c +} + +func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest) + if err != nil { + return nil, err + } + ctype := "application/json" + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "disk": c.disk, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.disks.resize" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Resizes the specified persistent disk.", + // "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])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-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": "{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" + // ] + // } + +} + // method id "compute.firewalls.delete": type FirewallsDeleteCall struct { @@ -13369,7 +13749,7 @@ type FirewallsDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified firewall resource. +// Delete: Deletes the specified firewall. // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13378,23 +13758,6 @@ func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDel return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *FirewallsDeleteCall) QuotaUser(quotaUser string) *FirewallsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *FirewallsDeleteCall) UserIP(userIP string) *FirewallsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -13435,7 +13798,8 @@ func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -13464,7 +13828,7 @@ func (c *FirewallsDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified firewall resource.", + // "description": "Deletes the specified firewall.", // "httpMethod": "DELETE", // "id": "compute.firewalls.delete", // "parameterOrder": [ @@ -13473,7 +13837,7 @@ func (c *FirewallsDeleteCall) Do() (*Operation, error) { // ], // "parameters": { // "firewall": { - // "description": "Name of the firewall resource to delete.", + // "description": "Name of the firewall rule to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -13510,7 +13874,7 @@ type FirewallsGetCall struct { ctx_ context.Context } -// Get: Returns the specified firewall resource. +// Get: Returns the specified firewall. // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13519,23 +13883,6 @@ func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCal return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *FirewallsGetCall) QuotaUser(quotaUser string) *FirewallsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *FirewallsGetCall) UserIP(userIP string) *FirewallsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -13589,7 +13936,8 @@ func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*Firewall, error) { +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 { @@ -13618,7 +13966,7 @@ func (c *FirewallsGetCall) Do() (*Firewall, error) { } return ret, nil // { - // "description": "Returns the specified firewall resource.", + // "description": "Returns the specified firewall.", // "httpMethod": "GET", // "id": "compute.firewalls.get", // "parameterOrder": [ @@ -13627,7 +13975,7 @@ func (c *FirewallsGetCall) Do() (*Firewall, error) { // ], // "parameters": { // "firewall": { - // "description": "Name of the firewall resource to return.", + // "description": "Name of the firewall rule to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -13664,8 +14012,8 @@ type FirewallsInsertCall struct { ctx_ context.Context } -// Insert: Creates a firewall resource in the specified project using -// the data included in the request. +// Insert: Creates a firewall rule in the specified project using the +// data included in the request. // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13674,23 +14022,6 @@ func (r *FirewallsService) Insert(project string, firewall *Firewall) *Firewalls return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *FirewallsInsertCall) QuotaUser(quotaUser string) *FirewallsInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *FirewallsInsertCall) UserIP(userIP string) *FirewallsInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -13736,7 +14067,8 @@ func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -13765,7 +14097,7 @@ func (c *FirewallsInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a firewall resource in the specified project using the data included in the request.", + // "description": "Creates a firewall rule in the specified project using the data included in the request.", // "httpMethod": "POST", // "id": "compute.firewalls.insert", // "parameterOrder": [ @@ -13805,8 +14137,8 @@ type FirewallsListCall struct { ctx_ context.Context } -// List: Retrieves the list of firewall resources available to the -// specified project. +// List: Retrieves the list of firewall rules available to the specified +// project. // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list func (r *FirewallsService) List(project string) *FirewallsListCall { c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -13828,19 +14160,20 @@ func (r *FirewallsService) List(project string) *FirewallsListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { c.urlParams_.Set("filter", filter) @@ -13848,10 +14181,10 @@ func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -13865,23 +14198,6 @@ func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *FirewallsListCall) QuotaUser(quotaUser string) *FirewallsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *FirewallsListCall) UserIP(userIP string) *FirewallsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -13934,7 +14250,8 @@ func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) { // 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() (*FirewallList, error) { +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 { @@ -13963,7 +14280,7 @@ func (c *FirewallsListCall) Do() (*FirewallList, error) { } return ret, nil // { - // "description": "Retrieves the list of firewall resources available to the specified project.", + // "description": "Retrieves the list of firewall rules available to the specified project.", // "httpMethod": "GET", // "id": "compute.firewalls.list", // "parameterOrder": [ @@ -13971,13 +14288,13 @@ func (c *FirewallsListCall) Do() (*FirewallList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -14010,6 +14327,27 @@ func (c *FirewallsListCall) Do() (*FirewallList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.firewalls.patch": type FirewallsPatchCall struct { @@ -14021,8 +14359,8 @@ type FirewallsPatchCall struct { ctx_ context.Context } -// Patch: Updates the specified firewall resource with the data included -// in the request. This method supports patch semantics. +// Patch: Updates the specified firewall rule with the data included in +// the request. This method supports patch semantics. // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -14032,23 +14370,6 @@ func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Fir return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *FirewallsPatchCall) QuotaUser(quotaUser string) *FirewallsPatchCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *FirewallsPatchCall) UserIP(userIP string) *FirewallsPatchCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -14095,7 +14416,8 @@ func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -14124,7 +14446,7 @@ func (c *FirewallsPatchCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Updates the specified firewall resource with the data included in the request. This method supports patch semantics.", + // "description": "Updates the specified firewall rule with the data included in the request. This method supports patch semantics.", // "httpMethod": "PATCH", // "id": "compute.firewalls.patch", // "parameterOrder": [ @@ -14133,7 +14455,7 @@ func (c *FirewallsPatchCall) Do() (*Operation, error) { // ], // "parameters": { // "firewall": { - // "description": "Name of the firewall resource to update.", + // "description": "Name of the firewall rule to update.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -14173,8 +14495,8 @@ type FirewallsUpdateCall struct { ctx_ context.Context } -// Update: Updates the specified firewall resource with the data -// included in the request. +// Update: Updates the specified firewall rule with the data included in +// the request. // For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -14184,23 +14506,6 @@ func (r *FirewallsService) Update(project string, firewall string, firewall2 *Fi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *FirewallsUpdateCall) QuotaUser(quotaUser string) *FirewallsUpdateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *FirewallsUpdateCall) UserIP(userIP string) *FirewallsUpdateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -14247,7 +14552,8 @@ func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -14276,7 +14582,7 @@ func (c *FirewallsUpdateCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Updates the specified firewall resource with the data included in the request.", + // "description": "Updates the specified firewall rule with the data included in the request.", // "httpMethod": "PUT", // "id": "compute.firewalls.update", // "parameterOrder": [ @@ -14285,7 +14591,7 @@ func (c *FirewallsUpdateCall) Do() (*Operation, error) { // ], // "parameters": { // "firewall": { - // "description": "Name of the firewall resource to update.", + // "description": "Name of the firewall rule to update.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -14324,8 +14630,7 @@ type ForwardingRulesAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of forwarding rules grouped by -// scope. +// AggregatedList: Retrieves an aggregated list of forwarding rules. // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -14347,19 +14652,20 @@ func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRules // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -14367,10 +14673,10 @@ func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRul } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -14384,23 +14690,6 @@ func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *Forward return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ForwardingRulesAggregatedListCall) QuotaUser(quotaUser string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ForwardingRulesAggregatedListCall) UserIP(userIP string) *ForwardingRulesAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -14453,7 +14742,8 @@ func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Respons // response was returned 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() (*ForwardingRuleAggregatedList, error) { +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 { @@ -14482,7 +14772,7 @@ func (c *ForwardingRulesAggregatedListCall) Do() (*ForwardingRuleAggregatedList, } return ret, nil // { - // "description": "Retrieves the list of forwarding rules grouped by scope.", + // "description": "Retrieves an aggregated list of forwarding rules.", // "httpMethod": "GET", // "id": "compute.forwardingRules.aggregatedList", // "parameterOrder": [ @@ -14490,13 +14780,13 @@ func (c *ForwardingRulesAggregatedListCall) Do() (*ForwardingRuleAggregatedList, // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -14529,6 +14819,27 @@ func (c *ForwardingRulesAggregatedListCall) Do() (*ForwardingRuleAggregatedList, } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.forwardingRules.delete": type ForwardingRulesDeleteCall struct { @@ -14550,23 +14861,6 @@ func (r *ForwardingRulesService) Delete(project string, region string, forwardin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ForwardingRulesDeleteCall) QuotaUser(quotaUser string) *ForwardingRulesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ForwardingRulesDeleteCall) UserIP(userIP string) *ForwardingRulesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -14608,7 +14902,8 @@ func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -14702,23 +14997,6 @@ func (r *ForwardingRulesService) Get(project string, region string, forwardingRu return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ForwardingRulesGetCall) QuotaUser(quotaUser string) *ForwardingRulesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ForwardingRulesGetCall) UserIP(userIP string) *ForwardingRulesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -14773,7 +15051,8 @@ func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*ForwardingRule, error) { +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 { @@ -14868,23 +15147,6 @@ func (r *ForwardingRulesService) Insert(project string, region string, forwardin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ForwardingRulesInsertCall) QuotaUser(quotaUser string) *ForwardingRulesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ForwardingRulesInsertCall) UserIP(userIP string) *ForwardingRulesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -14931,7 +15193,8 @@ func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -15009,7 +15272,7 @@ type ForwardingRulesListCall struct { ctx_ context.Context } -// List: Retrieves the list of ForwardingRule resources available to the +// List: Retrieves a list of ForwardingRule resources available to the // specified project and region. // For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { @@ -15033,19 +15296,20 @@ func (r *ForwardingRulesService) List(project string, region string) *Forwarding // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { c.urlParams_.Set("filter", filter) @@ -15053,10 +15317,10 @@ func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -15070,23 +15334,6 @@ func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesLi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ForwardingRulesListCall) QuotaUser(quotaUser string) *ForwardingRulesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ForwardingRulesListCall) UserIP(userIP string) *ForwardingRulesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15140,7 +15387,8 @@ func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) // returned 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() (*ForwardingRuleList, error) { +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 { @@ -15169,7 +15417,7 @@ func (c *ForwardingRulesListCall) Do() (*ForwardingRuleList, error) { } return ret, nil // { - // "description": "Retrieves the list of ForwardingRule resources available to the specified project and region.", + // "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.", // "httpMethod": "GET", // "id": "compute.forwardingRules.list", // "parameterOrder": [ @@ -15178,13 +15426,13 @@ func (c *ForwardingRulesListCall) Do() (*ForwardingRuleList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -15224,6 +15472,27 @@ func (c *ForwardingRulesListCall) Do() (*ForwardingRuleList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.forwardingRules.setTarget": type ForwardingRulesSetTargetCall struct { @@ -15248,23 +15517,6 @@ func (r *ForwardingRulesService) SetTarget(project string, region string, forwar return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ForwardingRulesSetTargetCall) QuotaUser(quotaUser string) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ForwardingRulesSetTargetCall) UserIP(userIP string) *ForwardingRulesSetTargetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15312,7 +15564,8 @@ func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, er // 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() (*Operation, error) { +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 { @@ -15406,23 +15659,6 @@ func (r *GlobalAddressesService) Delete(project string, address string) *GlobalA return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalAddressesDeleteCall) QuotaUser(quotaUser string) *GlobalAddressesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalAddressesDeleteCall) UserIP(userIP string) *GlobalAddressesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15463,7 +15699,8 @@ func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -15538,7 +15775,8 @@ type GlobalAddressesGetCall struct { ctx_ context.Context } -// Get: Returns the specified address resource. +// Get: Returns the specified address resource. Get a list of available +// addresses by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -15547,23 +15785,6 @@ func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddr return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalAddressesGetCall) QuotaUser(quotaUser string) *GlobalAddressesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalAddressesGetCall) UserIP(userIP string) *GlobalAddressesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15617,7 +15838,8 @@ func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *GlobalAddressesGetCall) Do() (*Address, error) { +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 { @@ -15646,7 +15868,7 @@ func (c *GlobalAddressesGetCall) Do() (*Address, error) { } return ret, nil // { - // "description": "Returns the specified address resource.", + // "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.", // "httpMethod": "GET", // "id": "compute.globalAddresses.get", // "parameterOrder": [ @@ -15702,23 +15924,6 @@ func (r *GlobalAddressesService) Insert(project string, address *Address) *Globa return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalAddressesInsertCall) QuotaUser(quotaUser string) *GlobalAddressesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalAddressesInsertCall) UserIP(userIP string) *GlobalAddressesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15764,7 +15969,8 @@ func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -15833,7 +16039,7 @@ type GlobalAddressesListCall struct { ctx_ context.Context } -// List: Retrieves the list of global address resources. +// List: Retrieves a list of global addresses. // For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -15855,19 +16061,20 @@ func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { c.urlParams_.Set("filter", filter) @@ -15875,10 +16082,10 @@ func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -15892,23 +16099,6 @@ func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesLi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalAddressesListCall) QuotaUser(quotaUser string) *GlobalAddressesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalAddressesListCall) UserIP(userIP string) *GlobalAddressesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15961,7 +16151,8 @@ func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) // 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() (*AddressList, error) { +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 { @@ -15990,7 +16181,7 @@ func (c *GlobalAddressesListCall) Do() (*AddressList, error) { } return ret, nil // { - // "description": "Retrieves the list of global address resources.", + // "description": "Retrieves a list of global addresses.", // "httpMethod": "GET", // "id": "compute.globalAddresses.list", // "parameterOrder": [ @@ -15998,13 +16189,13 @@ func (c *GlobalAddressesListCall) Do() (*AddressList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -16037,6 +16228,27 @@ func (c *GlobalAddressesListCall) Do() (*AddressList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.globalForwardingRules.delete": type GlobalForwardingRulesDeleteCall struct { @@ -16056,23 +16268,6 @@ func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule str return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalForwardingRulesDeleteCall) QuotaUser(quotaUser string) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalForwardingRulesDeleteCall) UserIP(userIP string) *GlobalForwardingRulesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16113,7 +16308,8 @@ func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -16188,7 +16384,8 @@ type GlobalForwardingRulesGetCall struct { ctx_ context.Context } -// Get: Returns the specified ForwardingRule resource. +// Get: Returns the specified ForwardingRule resource. Get a list of +// available forwarding rules by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -16197,23 +16394,6 @@ func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalForwardingRulesGetCall) QuotaUser(quotaUser string) *GlobalForwardingRulesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalForwardingRulesGetCall) UserIP(userIP string) *GlobalForwardingRulesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16267,7 +16447,8 @@ func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, er // 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() (*ForwardingRule, error) { +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 { @@ -16296,7 +16477,7 @@ func (c *GlobalForwardingRulesGetCall) Do() (*ForwardingRule, error) { } return ret, nil // { - // "description": "Returns the specified ForwardingRule resource.", + // "description": "Returns the specified ForwardingRule resource. Get a list of available forwarding rules by making a list() request.", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.get", // "parameterOrder": [ @@ -16352,23 +16533,6 @@ func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *Fo return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalForwardingRulesInsertCall) QuotaUser(quotaUser string) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalForwardingRulesInsertCall) UserIP(userIP string) *GlobalForwardingRulesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16414,7 +16578,8 @@ func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -16483,7 +16648,7 @@ type GlobalForwardingRulesListCall struct { ctx_ context.Context } -// List: Retrieves the list of ForwardingRule resources available to the +// List: Retrieves a list of ForwardingRule resources available to the // specified project. // For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { @@ -16506,19 +16671,20 @@ func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRul // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { c.urlParams_.Set("filter", filter) @@ -16526,10 +16692,10 @@ func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingR } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -16543,23 +16709,6 @@ func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwa return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalForwardingRulesListCall) QuotaUser(quotaUser string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalForwardingRulesListCall) UserIP(userIP string) *GlobalForwardingRulesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16612,7 +16761,8 @@ func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, e // returned 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() (*ForwardingRuleList, error) { +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 { @@ -16641,7 +16791,7 @@ func (c *GlobalForwardingRulesListCall) Do() (*ForwardingRuleList, error) { } return ret, nil // { - // "description": "Retrieves the list of ForwardingRule resources available to the specified project.", + // "description": "Retrieves a list of ForwardingRule resources available to the specified project.", // "httpMethod": "GET", // "id": "compute.globalForwardingRules.list", // "parameterOrder": [ @@ -16649,13 +16799,13 @@ func (c *GlobalForwardingRulesListCall) Do() (*ForwardingRuleList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -16688,6 +16838,27 @@ func (c *GlobalForwardingRulesListCall) Do() (*ForwardingRuleList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.globalForwardingRules.setTarget": type GlobalForwardingRulesSetTargetCall struct { @@ -16710,23 +16881,6 @@ func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalForwardingRulesSetTargetCall) QuotaUser(quotaUser string) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalForwardingRulesSetTargetCall) UserIP(userIP string) *GlobalForwardingRulesSetTargetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16773,7 +16927,8 @@ func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Respon // 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() (*Operation, error) { +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 { @@ -16850,8 +17005,7 @@ type GlobalOperationsAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of all operations grouped by -// scope. +// AggregatedList: Retrieves an aggregated list of all operations. // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -16873,19 +17027,20 @@ func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperatio // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -16893,10 +17048,10 @@ func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperat } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -16910,23 +17065,6 @@ func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *Global return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalOperationsAggregatedListCall) QuotaUser(quotaUser string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalOperationsAggregatedListCall) UserIP(userIP string) *GlobalOperationsAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -16979,7 +17117,8 @@ func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Respon // returned 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() (*OperationAggregatedList, error) { +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 { @@ -17008,7 +17147,7 @@ func (c *GlobalOperationsAggregatedListCall) Do() (*OperationAggregatedList, err } return ret, nil // { - // "description": "Retrieves the list of all operations grouped by scope.", + // "description": "Retrieves an aggregated list of all operations.", // "httpMethod": "GET", // "id": "compute.globalOperations.aggregatedList", // "parameterOrder": [ @@ -17016,13 +17155,13 @@ func (c *GlobalOperationsAggregatedListCall) Do() (*OperationAggregatedList, err // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -17055,6 +17194,27 @@ func (c *GlobalOperationsAggregatedListCall) Do() (*OperationAggregatedList, err } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.globalOperations.delete": type GlobalOperationsDeleteCall struct { @@ -17074,23 +17234,6 @@ func (r *GlobalOperationsService) Delete(project string, operation string) *Glob return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalOperationsDeleteCall) QuotaUser(quotaUser string) *GlobalOperationsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalOperationsDeleteCall) UserIP(userIP string) *GlobalOperationsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17125,7 +17268,8 @@ func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, erro } // Do executes the "compute.globalOperations.delete" call. -func (c *GlobalOperationsDeleteCall) Do() error { +func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if err != nil { return err @@ -17179,7 +17323,8 @@ type GlobalOperationsGetCall struct { ctx_ context.Context } -// Get: Retrieves the specified Operations resource. +// Get: Retrieves the specified Operations resource. Get a list of +// operations by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -17188,23 +17333,6 @@ func (r *GlobalOperationsService) Get(project string, operation string) *GlobalO return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalOperationsGetCall) QuotaUser(quotaUser string) *GlobalOperationsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalOperationsGetCall) UserIP(userIP string) *GlobalOperationsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17258,7 +17386,8 @@ func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -17287,7 +17416,7 @@ func (c *GlobalOperationsGetCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Retrieves the specified Operations resource.", + // "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.", // "httpMethod": "GET", // "id": "compute.globalOperations.get", // "parameterOrder": [ @@ -17333,7 +17462,7 @@ type GlobalOperationsListCall struct { ctx_ context.Context } -// List: Retrieves the list of Operation resources contained within the +// List: Retrieves a list of Operation resources contained within the // specified project. // For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { @@ -17356,19 +17485,20 @@ func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { c.urlParams_.Set("filter", filter) @@ -17376,10 +17506,10 @@ func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCa } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -17393,23 +17523,6 @@ func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperations return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *GlobalOperationsListCall) QuotaUser(quotaUser string) *GlobalOperationsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *GlobalOperationsListCall) UserIP(userIP string) *GlobalOperationsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17462,7 +17575,8 @@ func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) // 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() (*OperationList, error) { +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 { @@ -17491,7 +17605,7 @@ func (c *GlobalOperationsListCall) Do() (*OperationList, error) { } return ret, nil // { - // "description": "Retrieves the list of Operation resources contained within the specified project.", + // "description": "Retrieves a list of Operation resources contained within the specified project.", // "httpMethod": "GET", // "id": "compute.globalOperations.list", // "parameterOrder": [ @@ -17499,13 +17613,13 @@ func (c *GlobalOperationsListCall) Do() (*OperationList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -17538,6 +17652,27 @@ func (c *GlobalOperationsListCall) Do() (*OperationList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.httpHealthChecks.delete": type HttpHealthChecksDeleteCall struct { @@ -17557,23 +17692,6 @@ func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpHealthChecksDeleteCall) QuotaUser(quotaUser string) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpHealthChecksDeleteCall) UserIP(userIP string) *HttpHealthChecksDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17614,7 +17732,8 @@ func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, erro // 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() (*Operation, error) { +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 { @@ -17689,7 +17808,8 @@ type HttpHealthChecksGetCall struct { ctx_ context.Context } -// Get: Returns the specified HttpHealthCheck resource. +// Get: Returns the specified HttpHealthCheck resource. Get a list of +// available HTTP health checks by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -17698,23 +17818,6 @@ func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *H return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpHealthChecksGetCall) QuotaUser(quotaUser string) *HttpHealthChecksGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpHealthChecksGetCall) UserIP(userIP string) *HttpHealthChecksGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17768,7 +17871,8 @@ func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) // 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() (*HttpHealthCheck, error) { +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 { @@ -17797,7 +17901,7 @@ func (c *HttpHealthChecksGetCall) Do() (*HttpHealthCheck, error) { } return ret, nil // { - // "description": "Returns the specified HttpHealthCheck resource.", + // "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.", // "httpMethod": "GET", // "id": "compute.httpHealthChecks.get", // "parameterOrder": [ @@ -17853,23 +17957,6 @@ func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHe return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpHealthChecksInsertCall) QuotaUser(quotaUser string) *HttpHealthChecksInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpHealthChecksInsertCall) UserIP(userIP string) *HttpHealthChecksInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -17915,7 +18002,8 @@ func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, erro // 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() (*Operation, error) { +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 { @@ -18007,19 +18095,20 @@ func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { c.urlParams_.Set("filter", filter) @@ -18027,10 +18116,10 @@ func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCa } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -18044,23 +18133,6 @@ func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecks return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpHealthChecksListCall) QuotaUser(quotaUser string) *HttpHealthChecksListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpHealthChecksListCall) UserIP(userIP string) *HttpHealthChecksListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18113,7 +18185,8 @@ func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) // returned 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() (*HttpHealthCheckList, error) { +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 { @@ -18150,13 +18223,13 @@ func (c *HttpHealthChecksListCall) Do() (*HttpHealthCheckList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -18189,6 +18262,27 @@ func (c *HttpHealthChecksListCall) Do() (*HttpHealthCheckList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.httpHealthChecks.patch": type HttpHealthChecksPatchCall struct { @@ -18212,23 +18306,6 @@ func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpHealthChecksPatchCall) QuotaUser(quotaUser string) *HttpHealthChecksPatchCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpHealthChecksPatchCall) UserIP(userIP string) *HttpHealthChecksPatchCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18275,7 +18352,8 @@ func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -18364,23 +18442,6 @@ func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpHealthChecksUpdateCall) QuotaUser(quotaUser string) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpHealthChecksUpdateCall) UserIP(userIP string) *HttpHealthChecksUpdateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18427,7 +18488,8 @@ func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, erro // 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() (*Operation, error) { +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 { @@ -18512,23 +18574,6 @@ func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpsHealthChecksDeleteCall) QuotaUser(quotaUser string) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpsHealthChecksDeleteCall) UserIP(userIP string) *HttpsHealthChecksDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18569,7 +18614,8 @@ func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -18644,7 +18690,8 @@ type HttpsHealthChecksGetCall struct { ctx_ context.Context } -// Get: Returns the specified HttpsHealthCheck resource. +// Get: Returns the specified HttpsHealthCheck resource. Get a list of +// available HTTPS health checks by making a list() request. func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall { c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -18652,23 +18699,6 @@ func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpsHealthChecksGetCall) QuotaUser(quotaUser string) *HttpsHealthChecksGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpsHealthChecksGetCall) UserIP(userIP string) *HttpsHealthChecksGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18722,7 +18752,8 @@ func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) // returned 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() (*HttpsHealthCheck, error) { +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 { @@ -18751,7 +18782,7 @@ func (c *HttpsHealthChecksGetCall) Do() (*HttpsHealthCheck, error) { } return ret, nil // { - // "description": "Returns the specified HttpsHealthCheck resource.", + // "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.", // "httpMethod": "GET", // "id": "compute.httpsHealthChecks.get", // "parameterOrder": [ @@ -18806,23 +18837,6 @@ func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *Http return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpsHealthChecksInsertCall) QuotaUser(quotaUser string) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpsHealthChecksInsertCall) UserIP(userIP string) *HttpsHealthChecksInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -18868,7 +18882,8 @@ func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -18959,19 +18974,20 @@ func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCa // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall { c.urlParams_.Set("filter", filter) @@ -18979,10 +18995,10 @@ func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksList } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -18996,23 +19012,6 @@ func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChec return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpsHealthChecksListCall) QuotaUser(quotaUser string) *HttpsHealthChecksListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpsHealthChecksListCall) UserIP(userIP string) *HttpsHealthChecksListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19065,7 +19064,8 @@ func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error // returned 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() (*HttpsHealthCheckList, error) { +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 { @@ -19102,13 +19102,13 @@ func (c *HttpsHealthChecksListCall) Do() (*HttpsHealthCheckList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -19141,6 +19141,27 @@ func (c *HttpsHealthChecksListCall) Do() (*HttpsHealthCheckList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.httpsHealthChecks.patch": type HttpsHealthChecksPatchCall struct { @@ -19163,23 +19184,6 @@ func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpsHealthChecksPatchCall) QuotaUser(quotaUser string) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpsHealthChecksPatchCall) UserIP(userIP string) *HttpsHealthChecksPatchCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19226,7 +19230,8 @@ func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, erro // 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() (*Operation, error) { +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 { @@ -19314,23 +19319,6 @@ func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *HttpsHealthChecksUpdateCall) QuotaUser(quotaUser string) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *HttpsHealthChecksUpdateCall) UserIP(userIP string) *HttpsHealthChecksUpdateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19377,7 +19365,8 @@ func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -19454,7 +19443,7 @@ type ImagesDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified image resource. +// Delete: Deletes the specified image. // For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -19463,23 +19452,6 @@ func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ImagesDeleteCall) QuotaUser(quotaUser string) *ImagesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ImagesDeleteCall) UserIP(userIP string) *ImagesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19520,7 +19492,8 @@ func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -19549,7 +19522,7 @@ func (c *ImagesDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified image resource.", + // "description": "Deletes the specified image.", // "httpMethod": "DELETE", // "id": "compute.images.delete", // "parameterOrder": [ @@ -19608,23 +19581,6 @@ func (r *ImagesService) Deprecate(project string, image string, deprecationstatu return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ImagesDeprecateCall) QuotaUser(quotaUser string) *ImagesDeprecateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ImagesDeprecateCall) UserIP(userIP string) *ImagesDeprecateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19671,7 +19627,8 @@ func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -19749,7 +19706,8 @@ type ImagesGetCall struct { ctx_ context.Context } -// Get: Returns the specified image resource. +// Get: Returns the specified image. Get a list of available images by +// making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/images/get func (r *ImagesService) Get(project string, image string) *ImagesGetCall { c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -19758,23 +19716,6 @@ func (r *ImagesService) Get(project string, image string) *ImagesGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ImagesGetCall) QuotaUser(quotaUser string) *ImagesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ImagesGetCall) UserIP(userIP string) *ImagesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19828,7 +19769,8 @@ func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ImagesGetCall) Do() (*Image, error) { +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 { @@ -19857,7 +19799,7 @@ func (c *ImagesGetCall) Do() (*Image, error) { } return ret, nil // { - // "description": "Returns the specified image resource.", + // "description": "Returns the specified image. Get a list of available images by making a list() request.", // "httpMethod": "GET", // "id": "compute.images.get", // "parameterOrder": [ @@ -19893,6 +19835,145 @@ func (c *ImagesGetCall) Do() (*Image, error) { } +// method id "compute.images.getFromFamily": + +type ImagesGetFromFamilyCall struct { + s *Service + project string + family string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context +} + +// GetFromFamily: Returns the latest image that is part of an image +// family and is not deprecated. +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 information. +func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall { + c.ctx_ = ctx + return c +} + +func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/family/{family}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "family": c.family, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + req.Header.Set("If-None-Match", c.ifNoneMatch_) + } + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.images.getFromFamily" call. +// Exactly one of *Image or error will be non-nil. 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Image{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the latest image that is part of an image family and is not deprecated.", + // "httpMethod": "GET", + // "id": "compute.images.getFromFamily", + // "parameterOrder": [ + // "project", + // "family" + // ], + // "parameters": { + // "family": { + // "description": "Name of the image resource 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{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" + // ] + // } + +} + // method id "compute.images.insert": type ImagesInsertCall struct { @@ -19903,8 +19984,8 @@ type ImagesInsertCall struct { ctx_ context.Context } -// Insert: Creates an image resource in the specified project using the -// data included in the request. +// Insert: Creates an image in the specified project using the data +// included in the request. // For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -19913,23 +19994,6 @@ func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ImagesInsertCall) QuotaUser(quotaUser string) *ImagesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ImagesInsertCall) UserIP(userIP string) *ImagesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -19975,7 +20039,8 @@ func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -20004,7 +20069,7 @@ func (c *ImagesInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates an image resource in the specified project using the data included in the request.", + // "description": "Creates an image in the specified project using the data included in the request.", // "httpMethod": "POST", // "id": "compute.images.insert", // "parameterOrder": [ @@ -20077,19 +20142,20 @@ func (r *ImagesService) List(project string) *ImagesListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *ImagesListCall) Filter(filter string) *ImagesListCall { c.urlParams_.Set("filter", filter) @@ -20097,10 +20163,10 @@ func (c *ImagesListCall) Filter(filter string) *ImagesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -20114,23 +20180,6 @@ func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ImagesListCall) QuotaUser(quotaUser string) *ImagesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ImagesListCall) UserIP(userIP string) *ImagesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -20183,7 +20232,8 @@ func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) { // 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() (*ImageList, error) { +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 { @@ -20220,13 +20270,13 @@ func (c *ImagesListCall) Do() (*ImageList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -20259,6 +20309,27 @@ func (c *ImagesListCall) Do() (*ImageList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instanceGroupManagers.abandonInstances": type InstanceGroupManagersAbandonInstancesCall struct { @@ -20289,23 +20360,6 @@ func (r *InstanceGroupManagersService) AbandonInstances(project string, zone str return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersAbandonInstancesCall) QuotaUser(quotaUser string) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersAbandonInstancesCall) UserIP(userIP string) *InstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -20353,7 +20407,8 @@ func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http // 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() (*Operation, error) { +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 { @@ -20458,19 +20513,20 @@ func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceG // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -20478,10 +20534,10 @@ func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *Instanc } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -20495,23 +20551,6 @@ func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *I return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersAggregatedListCall) QuotaUser(quotaUser string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersAggregatedListCall) UserIP(userIP string) *InstanceGroupManagersAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -20565,7 +20604,8 @@ func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.R // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *InstanceGroupManagersAggregatedListCall) Do() (*InstanceGroupManagerAggregatedList, error) { +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 { @@ -20602,13 +20642,13 @@ func (c *InstanceGroupManagersAggregatedListCall) Do() (*InstanceGroupManagerAgg // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -20641,6 +20681,27 @@ func (c *InstanceGroupManagersAggregatedListCall) Do() (*InstanceGroupManagerAgg } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instanceGroupManagers.delete": type InstanceGroupManagersDeleteCall struct { @@ -20653,7 +20714,9 @@ type InstanceGroupManagersDeleteCall struct { } // Delete: Deletes the specified managed instance group and all of the -// instances in that group. +// instances in that group. Note that the instance group must not belong +// to a backend service. Read Deleting an instance group for more +// information. func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall { c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -20662,23 +20725,6 @@ func (r *InstanceGroupManagersService) Delete(project string, zone string, insta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersDeleteCall) QuotaUser(quotaUser string) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersDeleteCall) UserIP(userIP string) *InstanceGroupManagersDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -20720,7 +20766,8 @@ func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -20749,7 +20796,7 @@ func (c *InstanceGroupManagersDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified managed instance group and all of the instances in that group.", + // "description": "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.", // "httpMethod": "DELETE", // "id": "compute.instanceGroupManagers.delete", // "parameterOrder": [ @@ -20819,23 +20866,6 @@ func (r *InstanceGroupManagersService) DeleteInstances(project string, zone stri return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersDeleteInstancesCall) QuotaUser(quotaUser string) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersDeleteInstancesCall) UserIP(userIP string) *InstanceGroupManagersDeleteInstancesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -20883,7 +20913,8 @@ func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http. // 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() (*Operation, error) { +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 { @@ -20969,7 +21000,8 @@ type InstanceGroupManagersGetCall struct { } // Get: Returns all of the details about the specified managed instance -// group. +// group. Get a list of available managed instance groups by making a +// list() request. func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall { c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -20978,23 +21010,6 @@ func (r *InstanceGroupManagersService) Get(project string, zone string, instance return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersGetCall) QuotaUser(quotaUser string) *InstanceGroupManagersGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersGetCall) UserIP(userIP string) *InstanceGroupManagersGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21049,7 +21064,8 @@ func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, er // returned 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() (*InstanceGroupManager, error) { +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 { @@ -21078,7 +21094,7 @@ func (c *InstanceGroupManagersGetCall) Do() (*InstanceGroupManager, error) { } return ret, nil // { - // "description": "Returns all of the details about the specified managed instance group.", + // "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.", // "httpMethod": "GET", // "id": "compute.instanceGroupManagers.get", // "parameterOrder": [ @@ -21146,23 +21162,6 @@ func (r *InstanceGroupManagersService) Insert(project string, zone string, insta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersInsertCall) QuotaUser(quotaUser string) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersInsertCall) UserIP(userIP string) *InstanceGroupManagersInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21209,7 +21208,8 @@ func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -21309,19 +21309,20 @@ func (r *InstanceGroupManagersService) List(project string, zone string) *Instan // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall { c.urlParams_.Set("filter", filter) @@ -21329,10 +21330,10 @@ func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupMana } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -21346,23 +21347,6 @@ func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGro return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersListCall) QuotaUser(quotaUser string) *InstanceGroupManagersListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersListCall) UserIP(userIP string) *InstanceGroupManagersListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21416,7 +21400,8 @@ func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, e // returned 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() (*InstanceGroupManagerList, error) { +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 { @@ -21454,13 +21439,13 @@ func (c *InstanceGroupManagersListCall) Do() (*InstanceGroupManagerList, error) // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -21499,6 +21484,27 @@ func (c *InstanceGroupManagersListCall) Do() (*InstanceGroupManagerList, error) } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instanceGroupManagers.listManagedInstances": type InstanceGroupManagersListManagedInstancesCall struct { @@ -21524,23 +21530,6 @@ func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersListManagedInstancesCall) QuotaUser(quotaUser string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersListManagedInstancesCall) UserIP(userIP string) *InstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21584,7 +21573,8 @@ func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (* // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *InstanceGroupManagersListManagedInstancesCall) Do() (*InstanceGroupManagersListManagedInstancesResponse, error) { +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 { @@ -21683,23 +21673,6 @@ func (r *InstanceGroupManagersService) RecreateInstances(project string, zone st return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersRecreateInstancesCall) QuotaUser(quotaUser string) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersRecreateInstancesCall) UserIP(userIP string) *InstanceGroupManagersRecreateInstancesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21747,7 +21720,8 @@ func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*htt // 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() (*Operation, error) { +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 { @@ -21847,23 +21821,6 @@ func (r *InstanceGroupManagersService) Resize(project string, zone string, insta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersResizeCall) QuotaUser(quotaUser string) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersResizeCall) UserIP(userIP string) *InstanceGroupManagersResizeCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -21905,7 +21862,8 @@ func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -22007,23 +21965,6 @@ func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersSetInstanceTemplateCall) QuotaUser(quotaUser string) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersSetInstanceTemplateCall) UserIP(userIP string) *InstanceGroupManagersSetInstanceTemplateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22071,7 +22012,8 @@ func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*h // 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() (*Operation, error) { +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 { @@ -22172,23 +22114,6 @@ func (r *InstanceGroupManagersService) SetTargetPools(project string, zone strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupManagersSetTargetPoolsCall) QuotaUser(quotaUser string) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupManagersSetTargetPoolsCall) UserIP(userIP string) *InstanceGroupManagersSetTargetPoolsCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22236,7 +22161,8 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.R // 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() (*Operation, error) { +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 { @@ -22323,7 +22249,7 @@ type InstanceGroupsAddInstancesCall struct { // 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. +// network/subnetwork. Read Adding instances for more information. 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 @@ -22333,23 +22259,6 @@ func (r *InstanceGroupsService) AddInstances(project string, zone string, instan return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsAddInstancesCall) QuotaUser(quotaUser string) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsAddInstancesCall) UserIP(userIP string) *InstanceGroupsAddInstancesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22397,7 +22306,8 @@ func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -22426,7 +22336,7 @@ func (c *InstanceGroupsAddInstancesCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "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.", + // "description": "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.", // "httpMethod": "POST", // "id": "compute.instanceGroups.addInstances", // "parameterOrder": [ @@ -22502,19 +22412,20 @@ func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAg // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -22522,10 +22433,10 @@ func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroups } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -22539,23 +22450,6 @@ func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *Instance return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsAggregatedListCall) QuotaUser(quotaUser string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsAggregatedListCall) UserIP(userIP string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22608,7 +22502,8 @@ func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response // was returned 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() (*InstanceGroupAggregatedList, error) { +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 { @@ -22645,13 +22540,13 @@ func (c *InstanceGroupsAggregatedListCall) Do() (*InstanceGroupAggregatedList, e // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -22684,6 +22579,27 @@ func (c *InstanceGroupsAggregatedListCall) Do() (*InstanceGroupAggregatedList, e } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instanceGroups.delete": type InstanceGroupsDeleteCall struct { @@ -22696,7 +22612,9 @@ type InstanceGroupsDeleteCall struct { } // Delete: Deletes the specified instance group. The instances in the -// group are not deleted. +// group are not deleted. Note that instance group must not belong to a +// backend service. Read Deleting an instance group for more +// information. func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -22705,23 +22623,6 @@ func (r *InstanceGroupsService) Delete(project string, zone string, instanceGrou return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsDeleteCall) QuotaUser(quotaUser string) *InstanceGroupsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsDeleteCall) UserIP(userIP string) *InstanceGroupsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22763,7 +22664,8 @@ func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -22792,7 +22694,7 @@ func (c *InstanceGroupsDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified instance group. The instances in the group are not deleted.", + // "description": "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.", // "httpMethod": "DELETE", // "id": "compute.instanceGroups.delete", // "parameterOrder": [ @@ -22845,7 +22747,8 @@ type InstanceGroupsGetCall struct { ctx_ context.Context } -// Get: Returns the specified instance group resource. +// Get: Returns the specified instance group. Get a list of available +// instance groups by making a list() request. func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -22854,23 +22757,6 @@ func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup s return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsGetCall) QuotaUser(quotaUser string) *InstanceGroupsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsGetCall) UserIP(userIP string) *InstanceGroupsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -22925,7 +22811,8 @@ func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*InstanceGroup, error) { +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 { @@ -22954,7 +22841,7 @@ func (c *InstanceGroupsGetCall) Do() (*InstanceGroup, error) { } return ret, nil // { - // "description": "Returns the specified instance group resource.", + // "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.", // "httpMethod": "GET", // "id": "compute.instanceGroups.get", // "parameterOrder": [ @@ -23017,23 +22904,6 @@ func (r *InstanceGroupsService) Insert(project string, zone string, instancegrou return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsInsertCall) QuotaUser(quotaUser string) *InstanceGroupsInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsInsertCall) UserIP(userIP string) *InstanceGroupsInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23080,7 +22950,8 @@ func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -23180,19 +23051,20 @@ func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroup // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { c.urlParams_.Set("filter", filter) @@ -23200,10 +23072,10 @@ func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -23217,23 +23089,6 @@ func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsList return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsListCall) QuotaUser(quotaUser string) *InstanceGroupsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsListCall) UserIP(userIP string) *InstanceGroupsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23287,7 +23142,8 @@ func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { // returned 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() (*InstanceGroupList, error) { +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 { @@ -23325,13 +23181,13 @@ func (c *InstanceGroupsListCall) Do() (*InstanceGroupList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -23370,6 +23226,27 @@ func (c *InstanceGroupsListCall) Do() (*InstanceGroupList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instanceGroups.listInstances": type InstanceGroupsListInstancesCall struct { @@ -23406,19 +23283,20 @@ func (r *InstanceGroupsService) ListInstances(project string, zone string, insta // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { c.urlParams_.Set("filter", filter) @@ -23426,10 +23304,10 @@ func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsL } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -23443,23 +23321,6 @@ func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceG return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsListInstancesCall) QuotaUser(quotaUser string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsListInstancesCall) UserIP(userIP string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23507,7 +23368,8 @@ func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, // was returned 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() (*InstanceGroupsListInstances, error) { +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 { @@ -23546,7 +23408,7 @@ func (c *InstanceGroupsListInstancesCall) Do() (*InstanceGroupsListInstances, er // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, @@ -23558,7 +23420,7 @@ func (c *InstanceGroupsListInstancesCall) Do() (*InstanceGroupsListInstances, er // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -23623,23 +23485,6 @@ func (r *InstanceGroupsService) RemoveInstances(project string, zone string, ins return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsRemoveInstancesCall) QuotaUser(quotaUser string) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsRemoveInstancesCall) UserIP(userIP string) *InstanceGroupsRemoveInstancesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23687,7 +23532,8 @@ func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Respons // 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() (*Operation, error) { +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 { @@ -23782,23 +23628,6 @@ func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, insta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceGroupsSetNamedPortsCall) QuotaUser(quotaUser string) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceGroupsSetNamedPortsCall) UserIP(userIP string) *InstanceGroupsSetNamedPortsCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23846,7 +23675,8 @@ func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -23929,7 +23759,11 @@ type InstanceTemplatesDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified instance template. +// Delete: Deletes the specified instance template. If you delete an +// instance template that is being referenced from another instance +// group, the instance group will not be able to create or recreate +// virtual machine instances. Deleting an instance template is permanent +// and cannot be undone. // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -23938,23 +23772,6 @@ func (r *InstanceTemplatesService) Delete(project string, instanceTemplate strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceTemplatesDeleteCall) QuotaUser(quotaUser string) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceTemplatesDeleteCall) UserIP(userIP string) *InstanceTemplatesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -23995,7 +23812,8 @@ func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -24024,7 +23842,7 @@ func (c *InstanceTemplatesDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified instance template.", + // "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.", // "httpMethod": "DELETE", // "id": "compute.instanceTemplates.delete", // "parameterOrder": [ @@ -24070,7 +23888,8 @@ type InstanceTemplatesGetCall struct { ctx_ context.Context } -// Get: Returns the specified instance template resource. +// Get: Returns the specified instance template. Get a list of available +// instance templates by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -24079,23 +23898,6 @@ func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceTemplatesGetCall) QuotaUser(quotaUser string) *InstanceTemplatesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceTemplatesGetCall) UserIP(userIP string) *InstanceTemplatesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24149,7 +23951,8 @@ func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) // returned 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() (*InstanceTemplate, error) { +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 { @@ -24178,7 +23981,7 @@ func (c *InstanceTemplatesGetCall) Do() (*InstanceTemplate, error) { } return ret, nil // { - // "description": "Returns the specified instance template resource.", + // "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.", // "httpMethod": "GET", // "id": "compute.instanceTemplates.get", // "parameterOrder": [ @@ -24225,7 +24028,10 @@ type InstanceTemplatesInsertCall struct { } // Insert: Creates an instance template in the specified project using -// the data that is included in the request. +// 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. // For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -24234,23 +24040,6 @@ func (r *InstanceTemplatesService) Insert(project string, instancetemplate *Inst return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceTemplatesInsertCall) QuotaUser(quotaUser string) *InstanceTemplatesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceTemplatesInsertCall) UserIP(userIP string) *InstanceTemplatesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24296,7 +24085,8 @@ func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -24325,7 +24115,7 @@ func (c *InstanceTemplatesInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates an instance template in the specified project using the data that is included in the request.", + // "description": "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.", // "httpMethod": "POST", // "id": "compute.instanceTemplates.insert", // "parameterOrder": [ @@ -24388,19 +24178,20 @@ func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCa // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { c.urlParams_.Set("filter", filter) @@ -24408,10 +24199,10 @@ func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesList } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -24425,23 +24216,6 @@ func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplat return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstanceTemplatesListCall) QuotaUser(quotaUser string) *InstanceTemplatesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstanceTemplatesListCall) UserIP(userIP string) *InstanceTemplatesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24494,7 +24268,8 @@ func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error // returned 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() (*InstanceTemplateList, error) { +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 { @@ -24531,13 +24306,13 @@ func (c *InstanceTemplatesListCall) Do() (*InstanceTemplateList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -24570,6 +24345,27 @@ func (c *InstanceTemplatesListCall) Do() (*InstanceTemplateList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instances.addAccessConfig": type InstancesAddAccessConfigCall struct { @@ -24595,23 +24391,6 @@ func (r *InstancesService) AddAccessConfig(project string, zone string, instance return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesAddAccessConfigCall) QuotaUser(quotaUser string) *InstancesAddAccessConfigCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesAddAccessConfigCall) UserIP(userIP string) *InstancesAddAccessConfigCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24659,7 +24438,8 @@ func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, er // 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() (*Operation, error) { +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 { @@ -24751,7 +24531,7 @@ type InstancesAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves aggregated list of instance resources. +// AggregatedList: Retrieves aggregated list of instances. // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -24773,19 +24553,20 @@ func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedLi // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -24793,10 +24574,10 @@ func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregated } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -24810,23 +24591,6 @@ func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggr return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesAggregatedListCall) QuotaUser(quotaUser string) *InstancesAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesAggregatedListCall) UserIP(userIP string) *InstancesAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -24879,7 +24643,8 @@ func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, err // returned 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() (*InstanceAggregatedList, error) { +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 { @@ -24908,7 +24673,7 @@ func (c *InstancesAggregatedListCall) Do() (*InstanceAggregatedList, error) { } return ret, nil // { - // "description": "Retrieves aggregated list of instance resources.", + // "description": "Retrieves aggregated list of instances.", // "httpMethod": "GET", // "id": "compute.instances.aggregatedList", // "parameterOrder": [ @@ -24916,13 +24681,13 @@ func (c *InstancesAggregatedListCall) Do() (*InstanceAggregatedList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -24955,6 +24720,27 @@ func (c *InstancesAggregatedListCall) Do() (*InstanceAggregatedList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instances.attachDisk": type InstancesAttachDiskCall struct { @@ -24978,23 +24764,6 @@ func (r *InstancesService) AttachDisk(project string, zone string, instance stri return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesAttachDiskCall) QuotaUser(quotaUser string) *InstancesAttachDiskCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesAttachDiskCall) UserIP(userIP string) *InstancesAttachDiskCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25042,7 +24811,8 @@ func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -25081,7 +24851,7 @@ func (c *InstancesAttachDiskCall) Do() (*Operation, error) { // ], // "parameters": { // "instance": { - // "description": "Instance name.", + // "description": "The instance name for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -25139,23 +24909,6 @@ func (r *InstancesService) Delete(project string, zone string, instance string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesDeleteCall) QuotaUser(quotaUser string) *InstancesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesDeleteCall) UserIP(userIP string) *InstancesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25197,7 +24950,8 @@ func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -25293,23 +25047,6 @@ func (r *InstancesService) DeleteAccessConfig(project string, zone string, insta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesDeleteAccessConfigCall) QuotaUser(quotaUser string) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesDeleteAccessConfigCall) UserIP(userIP string) *InstancesDeleteAccessConfigCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25351,7 +25088,8 @@ func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -25459,23 +25197,6 @@ func (r *InstancesService) DetachDisk(project string, zone string, instance stri return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesDetachDiskCall) QuotaUser(quotaUser string) *InstancesDetachDiskCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesDetachDiskCall) UserIP(userIP string) *InstancesDetachDiskCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25517,7 +25238,8 @@ func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -25609,7 +25331,8 @@ type InstancesGetCall struct { ctx_ context.Context } -// Get: Returns the specified instance resource. +// Get: Returns the specified Instance resource. Get a list of available +// instances by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -25619,23 +25342,6 @@ func (r *InstancesService) Get(project string, zone string, instance string) *In return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesGetCall) QuotaUser(quotaUser string) *InstancesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesGetCall) UserIP(userIP string) *InstancesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25690,7 +25396,8 @@ func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*Instance, error) { +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 { @@ -25719,7 +25426,7 @@ func (c *InstancesGetCall) Do() (*Instance, error) { } return ret, nil // { - // "description": "Returns the specified instance resource.", + // "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.", // "httpMethod": "GET", // "id": "compute.instances.get", // "parameterOrder": [ @@ -25793,23 +25500,6 @@ func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialP return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesGetSerialPortOutputCall) QuotaUser(quotaUser string) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesGetSerialPortOutputCall) UserIP(userIP string) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -25864,7 +25554,8 @@ func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response // returned 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() (*SerialPortOutput, error) { +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 { @@ -25968,23 +25659,6 @@ func (r *InstancesService) Insert(project string, zone string, instance *Instanc return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesInsertCall) QuotaUser(quotaUser string) *InstancesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesInsertCall) UserIP(userIP string) *InstancesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -26031,7 +25705,8 @@ func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -26109,8 +25784,8 @@ type InstancesListCall struct { ctx_ context.Context } -// List: Retrieves the list of instance resources contained within the -// specified zone. +// List: Retrieves the list of instances contained within the specified +// zone. // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list func (r *InstancesService) List(project string, zone string) *InstancesListCall { c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -26133,19 +25808,20 @@ func (r *InstancesService) List(project string, zone string) *InstancesListCall // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *InstancesListCall) Filter(filter string) *InstancesListCall { c.urlParams_.Set("filter", filter) @@ -26153,10 +25829,10 @@ func (c *InstancesListCall) Filter(filter string) *InstancesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -26170,23 +25846,6 @@ func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesListCall) QuotaUser(quotaUser string) *InstancesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesListCall) UserIP(userIP string) *InstancesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -26240,7 +25899,8 @@ func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { // 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() (*InstanceList, error) { +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 { @@ -26269,7 +25929,7 @@ func (c *InstancesListCall) Do() (*InstanceList, error) { } return ret, nil // { - // "description": "Retrieves the list of instance resources contained within the specified zone.", + // "description": "Retrieves the list of instances contained within the specified zone.", // "httpMethod": "GET", // "id": "compute.instances.list", // "parameterOrder": [ @@ -26278,13 +25938,13 @@ func (c *InstancesListCall) Do() (*InstanceList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -26324,6 +25984,27 @@ func (c *InstancesListCall) Do() (*InstanceList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.instances.reset": type InstancesResetCall struct { @@ -26345,23 +26026,6 @@ func (r *InstancesService) Reset(project string, zone string, instance string) * return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesResetCall) QuotaUser(quotaUser string) *InstancesResetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesResetCall) UserIP(userIP string) *InstancesResetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -26403,7 +26067,8 @@ func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -26499,23 +26164,6 @@ func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instan return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesSetDiskAutoDeleteCall) QuotaUser(quotaUser string) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesSetDiskAutoDeleteCall) UserIP(userIP string) *InstancesSetDiskAutoDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -26557,7 +26205,8 @@ func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -26644,6 +26293,152 @@ func (c *InstancesSetDiskAutoDeleteCall) Do() (*Operation, error) { } +// method id "compute.instances.setMachineType": + +type InstancesSetMachineTypeCall struct { + s *Service + project string + zone string + instance string + instancessetmachinetyperequest *InstancesSetMachineTypeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context +} + +// SetMachineType: Changes the machine type for a stopped instance to +// the machine type specified in the 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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { + c.ctx_ = ctx + return c +} + +func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest) + if err != nil { + return nil, err + } + ctype := "application/json" + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.instances.setMachineType" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes the machine type for a stopped instance to the machine type specified in the request.", + // "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])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-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": "{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" + // ] + // } + +} + // method id "compute.instances.setMetadata": type InstancesSetMetadataCall struct { @@ -26668,23 +26463,6 @@ func (r *InstancesService) SetMetadata(project string, zone string, instance str return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesSetMetadataCall) QuotaUser(quotaUser string) *InstancesSetMetadataCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesSetMetadataCall) UserIP(userIP string) *InstancesSetMetadataCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -26732,7 +26510,8 @@ func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -26830,23 +26609,6 @@ func (r *InstancesService) SetScheduling(project string, zone string, instance s return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesSetSchedulingCall) QuotaUser(quotaUser string) *InstancesSetSchedulingCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesSetSchedulingCall) UserIP(userIP string) *InstancesSetSchedulingCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -26894,7 +26656,8 @@ func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, erro // 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() (*Operation, error) { +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 { @@ -26993,23 +26756,6 @@ func (r *InstancesService) SetTags(project string, zone string, instance string, return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesSetTagsCall) QuotaUser(quotaUser string) *InstancesSetTagsCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesSetTagsCall) UserIP(userIP string) *InstancesSetTagsCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27057,7 +26803,8 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -27143,9 +26890,9 @@ type InstancesStartCall struct { ctx_ context.Context } -// Start: This method starts an instance that was stopped using the -// using the instances().stop method. For more information, see Restart -// an instance. +// Start: Starts an instance that was stopped using the using the +// instances().stop method. For more information, see Restart an +// instance. // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27155,23 +26902,6 @@ func (r *InstancesService) Start(project string, zone string, instance string) * return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesStartCall) QuotaUser(quotaUser string) *InstancesStartCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesStartCall) UserIP(userIP string) *InstancesStartCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27213,7 +26943,8 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -27242,7 +26973,7 @@ func (c *InstancesStartCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", + // "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", // "httpMethod": "POST", // "id": "compute.instances.start", // "parameterOrder": [ @@ -27296,13 +27027,13 @@ type InstancesStopCall struct { ctx_ context.Context } -// Stop: This method stops a running instance, shutting it down cleanly, -// and allows you to restart the instance at a later time. Stopped -// instances do not incur per-minute, virtual machine usage charges -// while they are stopped, but any resources that the virtual machine is -// using, such as persistent disks and static IP addresses,will continue -// to be charged until they are deleted. For more information, see -// Stopping an instance. +// 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 per-minute, virtual machine usage charges while they are +// stopped, but any resources that the virtual machine is using, such as +// persistent disks and static IP addresses, will continue to be charged +// until they are deleted. For more information, see Stopping an +// instance. // For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27312,23 +27043,6 @@ func (r *InstancesService) Stop(project string, zone string, instance string) *I return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *InstancesStopCall) QuotaUser(quotaUser string) *InstancesStopCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *InstancesStopCall) UserIP(userIP string) *InstancesStopCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27370,7 +27084,8 @@ func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -27399,7 +27114,7 @@ func (c *InstancesStopCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance.", + // "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.", // "httpMethod": "POST", // "id": "compute.instances.stop", // "parameterOrder": [ @@ -27453,7 +27168,8 @@ type LicensesGetCall struct { ctx_ context.Context } -// Get: Returns the specified license resource. +// Get: Returns the specified License resource. Get a list of available +// licenses by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get func (r *LicensesService) Get(project string, license string) *LicensesGetCall { c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27462,23 +27178,6 @@ func (r *LicensesService) Get(project string, license string) *LicensesGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *LicensesGetCall) QuotaUser(quotaUser string) *LicensesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *LicensesGetCall) UserIP(userIP string) *LicensesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27532,7 +27231,8 @@ func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *LicensesGetCall) Do() (*License, error) { +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 { @@ -27561,7 +27261,7 @@ func (c *LicensesGetCall) Do() (*License, error) { } return ret, nil // { - // "description": "Returns the specified license resource.", + // "description": "Returns the specified License resource. Get a list of available licenses by making a list() request.", // "httpMethod": "GET", // "id": "compute.licenses.get", // "parameterOrder": [ @@ -27570,7 +27270,7 @@ func (c *LicensesGetCall) Do() (*License, error) { // ], // "parameters": { // "license": { - // "description": "Name of the license resource to return.", + // "description": "Name of the License resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -27607,8 +27307,7 @@ type MachineTypesAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of machine type resources grouped -// by scope. +// AggregatedList: Retrieves an aggregated list of machine types. // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27630,19 +27329,20 @@ func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggreg // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -27650,10 +27350,10 @@ func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggr } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -27667,23 +27367,6 @@ func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTyp return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *MachineTypesAggregatedListCall) QuotaUser(quotaUser string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *MachineTypesAggregatedListCall) UserIP(userIP string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27736,7 +27419,8 @@ func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, // was returned 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() (*MachineTypeAggregatedList, error) { +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 { @@ -27765,7 +27449,7 @@ func (c *MachineTypesAggregatedListCall) Do() (*MachineTypeAggregatedList, error } return ret, nil // { - // "description": "Retrieves the list of machine type resources grouped by scope.", + // "description": "Retrieves an aggregated list of machine types.", // "httpMethod": "GET", // "id": "compute.machineTypes.aggregatedList", // "parameterOrder": [ @@ -27773,13 +27457,13 @@ func (c *MachineTypesAggregatedListCall) Do() (*MachineTypeAggregatedList, error // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -27812,6 +27496,27 @@ func (c *MachineTypesAggregatedListCall) Do() (*MachineTypeAggregatedList, error } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.machineTypes.get": type MachineTypesGetCall struct { @@ -27824,7 +27529,8 @@ type MachineTypesGetCall struct { ctx_ context.Context } -// Get: Returns the specified machine type resource. +// Get: Returns the specified machine type. Get a list of available +// machine types by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27834,23 +27540,6 @@ func (r *MachineTypesService) Get(project string, zone string, machineType strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *MachineTypesGetCall) QuotaUser(quotaUser string) *MachineTypesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *MachineTypesGetCall) UserIP(userIP string) *MachineTypesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -27905,7 +27594,8 @@ func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*MachineType, error) { +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 { @@ -27934,7 +27624,7 @@ func (c *MachineTypesGetCall) Do() (*MachineType, error) { } return ret, nil // { - // "description": "Returns the specified machine type resource.", + // "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.", // "httpMethod": "GET", // "id": "compute.machineTypes.get", // "parameterOrder": [ @@ -27944,7 +27634,7 @@ func (c *MachineTypesGetCall) Do() (*MachineType, error) { // ], // "parameters": { // "machineType": { - // "description": "Name of the machine type resource to return.", + // "description": "Name of the machine type to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -27989,8 +27679,8 @@ type MachineTypesListCall struct { ctx_ context.Context } -// List: Retrieves the list of machine type resources available to the -// specified project. +// List: Retrieves a list of machine types available to the specified +// project. // For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -28013,19 +27703,20 @@ func (r *MachineTypesService) List(project string, zone string) *MachineTypesLis // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { c.urlParams_.Set("filter", filter) @@ -28033,10 +27724,10 @@ func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -28050,23 +27741,6 @@ func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *MachineTypesListCall) QuotaUser(quotaUser string) *MachineTypesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *MachineTypesListCall) UserIP(userIP string) *MachineTypesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28120,7 +27794,8 @@ func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { // 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() (*MachineTypeList, error) { +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 { @@ -28149,7 +27824,7 @@ func (c *MachineTypesListCall) Do() (*MachineTypeList, error) { } return ret, nil // { - // "description": "Retrieves the list of machine type resources available to the specified project.", + // "description": "Retrieves a list of machine types available to the specified project.", // "httpMethod": "GET", // "id": "compute.machineTypes.list", // "parameterOrder": [ @@ -28158,13 +27833,13 @@ func (c *MachineTypesListCall) Do() (*MachineTypeList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -28204,6 +27879,27 @@ func (c *MachineTypesListCall) Do() (*MachineTypeList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.networks.delete": type NetworksDeleteCall struct { @@ -28214,7 +27910,7 @@ type NetworksDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified network resource. +// Delete: Deletes the specified network. // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -28223,23 +27919,6 @@ func (r *NetworksService) Delete(project string, network string) *NetworksDelete return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *NetworksDeleteCall) QuotaUser(quotaUser string) *NetworksDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *NetworksDeleteCall) UserIP(userIP string) *NetworksDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28280,7 +27959,8 @@ func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -28309,7 +27989,7 @@ func (c *NetworksDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified network resource.", + // "description": "Deletes the specified network.", // "httpMethod": "DELETE", // "id": "compute.networks.delete", // "parameterOrder": [ @@ -28318,7 +27998,7 @@ func (c *NetworksDeleteCall) Do() (*Operation, error) { // ], // "parameters": { // "network": { - // "description": "Name of the network resource to delete.", + // "description": "Name of the network to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -28355,7 +28035,8 @@ type NetworksGetCall struct { ctx_ context.Context } -// Get: Returns the specified network resource. +// Get: Returns the specified network. Get a list of available networks +// by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get func (r *NetworksService) Get(project string, network string) *NetworksGetCall { c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -28364,23 +28045,6 @@ func (r *NetworksService) Get(project string, network string) *NetworksGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *NetworksGetCall) QuotaUser(quotaUser string) *NetworksGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *NetworksGetCall) UserIP(userIP string) *NetworksGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28434,7 +28098,8 @@ func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *NetworksGetCall) Do() (*Network, error) { +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 { @@ -28463,7 +28128,7 @@ func (c *NetworksGetCall) Do() (*Network, error) { } return ret, nil // { - // "description": "Returns the specified network resource.", + // "description": "Returns the specified network. Get a list of available networks by making a list() request.", // "httpMethod": "GET", // "id": "compute.networks.get", // "parameterOrder": [ @@ -28472,7 +28137,7 @@ func (c *NetworksGetCall) Do() (*Network, error) { // ], // "parameters": { // "network": { - // "description": "Name of the network resource to return.", + // "description": "Name of the network to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -28509,8 +28174,8 @@ type NetworksInsertCall struct { ctx_ context.Context } -// Insert: Creates a network resource in the specified project using the -// data included in the request. +// Insert: Creates a network in the specified project using the data +// included in the request. // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -28519,23 +28184,6 @@ func (r *NetworksService) Insert(project string, network *Network) *NetworksInse return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *NetworksInsertCall) QuotaUser(quotaUser string) *NetworksInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *NetworksInsertCall) UserIP(userIP string) *NetworksInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28581,7 +28229,8 @@ func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -28610,7 +28259,7 @@ func (c *NetworksInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a network resource in the specified project using the data included in the request.", + // "description": "Creates a network in the specified project using the data included in the request.", // "httpMethod": "POST", // "id": "compute.networks.insert", // "parameterOrder": [ @@ -28650,8 +28299,8 @@ type NetworksListCall struct { ctx_ context.Context } -// List: Retrieves the list of network resources available to the -// specified project. +// List: Retrieves the list of networks available to the specified +// project. // For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list func (r *NetworksService) List(project string) *NetworksListCall { c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -28673,19 +28322,20 @@ func (r *NetworksService) List(project string) *NetworksListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *NetworksListCall) Filter(filter string) *NetworksListCall { c.urlParams_.Set("filter", filter) @@ -28693,10 +28343,10 @@ func (c *NetworksListCall) Filter(filter string) *NetworksListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -28710,23 +28360,6 @@ func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *NetworksListCall) QuotaUser(quotaUser string) *NetworksListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *NetworksListCall) UserIP(userIP string) *NetworksListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28779,7 +28412,8 @@ func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { // 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() (*NetworkList, error) { +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 { @@ -28808,7 +28442,7 @@ func (c *NetworksListCall) Do() (*NetworkList, error) { } return ret, nil // { - // "description": "Retrieves the list of network resources available to the specified project.", + // "description": "Retrieves the list of networks available to the specified project.", // "httpMethod": "GET", // "id": "compute.networks.list", // "parameterOrder": [ @@ -28816,13 +28450,13 @@ func (c *NetworksListCall) Do() (*NetworkList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -28855,6 +28489,27 @@ func (c *NetworksListCall) Do() (*NetworkList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.projects.get": type ProjectsGetCall struct { @@ -28865,7 +28520,7 @@ type ProjectsGetCall struct { ctx_ context.Context } -// Get: Returns the specified project resource. +// Get: Returns the specified Project resource. // For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get func (r *ProjectsService) Get(project string) *ProjectsGetCall { c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -28873,23 +28528,6 @@ func (r *ProjectsService) Get(project string) *ProjectsGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ProjectsGetCall) QuotaUser(quotaUser string) *ProjectsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ProjectsGetCall) UserIP(userIP string) *ProjectsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28942,7 +28580,8 @@ func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsGetCall) Do() (*Project, error) { +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 { @@ -28971,7 +28610,7 @@ func (c *ProjectsGetCall) Do() (*Project, error) { } return ret, nil // { - // "description": "Returns the specified project resource.", + // "description": "Returns the specified Project resource.", // "httpMethod": "GET", // "id": "compute.projects.get", // "parameterOrder": [ @@ -29017,23 +28656,6 @@ func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequ return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ProjectsMoveDiskCall) QuotaUser(quotaUser string) *ProjectsMoveDiskCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ProjectsMoveDiskCall) UserIP(userIP string) *ProjectsMoveDiskCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29079,7 +28701,8 @@ func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -29157,23 +28780,6 @@ func (r *ProjectsService) MoveInstance(project string, instancemoverequest *Inst return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ProjectsMoveInstanceCall) QuotaUser(quotaUser string) *ProjectsMoveInstanceCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ProjectsMoveInstanceCall) UserIP(userIP string) *ProjectsMoveInstanceCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29219,7 +28825,8 @@ func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -29298,23 +28905,6 @@ func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Me return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ProjectsSetCommonInstanceMetadataCall) QuotaUser(quotaUser string) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ProjectsSetCommonInstanceMetadataCall) UserIP(userIP string) *ProjectsSetCommonInstanceMetadataCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29360,7 +28950,8 @@ func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Res // 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() (*Operation, error) { +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 { @@ -29441,23 +29032,6 @@ func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocati return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ProjectsSetUsageExportBucketCall) QuotaUser(quotaUser string) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ProjectsSetUsageExportBucketCall) UserIP(userIP string) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29503,7 +29077,8 @@ func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response // 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() (*Operation, error) { +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 { @@ -29586,23 +29161,6 @@ func (r *RegionOperationsService) Delete(project string, region string, operatio return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RegionOperationsDeleteCall) QuotaUser(quotaUser string) *RegionOperationsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RegionOperationsDeleteCall) UserIP(userIP string) *RegionOperationsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29638,7 +29196,8 @@ func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, erro } // Do executes the "compute.regionOperations.delete" call. -func (c *RegionOperationsDeleteCall) Do() error { +func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if err != nil { return err @@ -29673,7 +29232,7 @@ func (c *RegionOperationsDeleteCall) Do() error { // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -29711,23 +29270,6 @@ func (r *RegionOperationsService) Get(project string, region string, operation s return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RegionOperationsGetCall) QuotaUser(quotaUser string) *RegionOperationsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RegionOperationsGetCall) UserIP(userIP string) *RegionOperationsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29782,7 +29324,8 @@ func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -29835,7 +29378,7 @@ func (c *RegionOperationsGetCall) Do() (*Operation, error) { // "type": "string" // }, // "region": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -29866,7 +29409,7 @@ type RegionOperationsListCall struct { ctx_ context.Context } -// List: Retrieves the list of Operation resources contained within the +// List: Retrieves a list of Operation resources contained within the // specified region. // For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { @@ -29890,19 +29433,20 @@ func (r *RegionOperationsService) List(project string, region string) *RegionOpe // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall { c.urlParams_.Set("filter", filter) @@ -29910,10 +29454,10 @@ func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCa } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -29927,23 +29471,6 @@ func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperations return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RegionOperationsListCall) QuotaUser(quotaUser string) *RegionOperationsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RegionOperationsListCall) UserIP(userIP string) *RegionOperationsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29997,7 +29524,8 @@ func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) // 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() (*OperationList, error) { +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 { @@ -30026,7 +29554,7 @@ func (c *RegionOperationsListCall) Do() (*OperationList, error) { } return ret, nil // { - // "description": "Retrieves the list of Operation resources contained within the specified region.", + // "description": "Retrieves a list of Operation resources contained within the specified region.", // "httpMethod": "GET", // "id": "compute.regionOperations.list", // "parameterOrder": [ @@ -30035,13 +29563,13 @@ func (c *RegionOperationsListCall) Do() (*OperationList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -30061,7 +29589,7 @@ func (c *RegionOperationsListCall) Do() (*OperationList, error) { // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -30081,6 +29609,27 @@ func (c *RegionOperationsListCall) Do() (*OperationList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.regions.get": type RegionsGetCall struct { @@ -30092,7 +29641,8 @@ type RegionsGetCall struct { ctx_ context.Context } -// Get: Returns the specified region resource. +// Get: Returns the specified Region resource. Get a list of available +// regions by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get func (r *RegionsService) Get(project string, region string) *RegionsGetCall { c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -30101,23 +29651,6 @@ func (r *RegionsService) Get(project string, region string) *RegionsGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RegionsGetCall) QuotaUser(quotaUser string) *RegionsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RegionsGetCall) UserIP(userIP string) *RegionsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -30171,7 +29704,8 @@ func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *RegionsGetCall) Do() (*Region, error) { +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 { @@ -30200,7 +29734,7 @@ func (c *RegionsGetCall) Do() (*Region, error) { } return ret, nil // { - // "description": "Returns the specified region resource.", + // "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.", // "httpMethod": "GET", // "id": "compute.regions.get", // "parameterOrder": [ @@ -30269,19 +29803,20 @@ func (r *RegionsService) List(project string) *RegionsListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *RegionsListCall) Filter(filter string) *RegionsListCall { c.urlParams_.Set("filter", filter) @@ -30289,10 +29824,10 @@ func (c *RegionsListCall) Filter(filter string) *RegionsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -30306,23 +29841,6 @@ func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RegionsListCall) QuotaUser(quotaUser string) *RegionsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RegionsListCall) UserIP(userIP string) *RegionsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -30375,7 +29893,8 @@ func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) { // 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() (*RegionList, error) { +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 { @@ -30412,13 +29931,13 @@ func (c *RegionsListCall) Do() (*RegionList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -30451,6 +29970,27 @@ func (c *RegionsListCall) Do() (*RegionList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.routes.delete": type RoutesDeleteCall struct { @@ -30461,7 +30001,7 @@ type RoutesDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified route resource. +// Delete: Deletes the specified Route resource. // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -30470,23 +30010,6 @@ func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RoutesDeleteCall) QuotaUser(quotaUser string) *RoutesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RoutesDeleteCall) UserIP(userIP string) *RoutesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -30527,7 +30050,8 @@ func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -30556,7 +30080,7 @@ func (c *RoutesDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified route resource.", + // "description": "Deletes the specified Route resource.", // "httpMethod": "DELETE", // "id": "compute.routes.delete", // "parameterOrder": [ @@ -30572,7 +30096,7 @@ func (c *RoutesDeleteCall) Do() (*Operation, error) { // "type": "string" // }, // "route": { - // "description": "Name of the route resource to delete.", + // "description": "Name of the Route resource to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -30602,7 +30126,8 @@ type RoutesGetCall struct { ctx_ context.Context } -// Get: Returns the specified route resource. +// Get: Returns the specified Route resource. Get a list of available +// routes by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get func (r *RoutesService) Get(project string, route string) *RoutesGetCall { c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -30611,23 +30136,6 @@ func (r *RoutesService) Get(project string, route string) *RoutesGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RoutesGetCall) QuotaUser(quotaUser string) *RoutesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RoutesGetCall) UserIP(userIP string) *RoutesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -30681,7 +30189,8 @@ func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *RoutesGetCall) Do() (*Route, error) { +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 { @@ -30710,7 +30219,7 @@ func (c *RoutesGetCall) Do() (*Route, error) { } return ret, nil // { - // "description": "Returns the specified route resource.", + // "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.", // "httpMethod": "GET", // "id": "compute.routes.get", // "parameterOrder": [ @@ -30726,7 +30235,7 @@ func (c *RoutesGetCall) Do() (*Route, error) { // "type": "string" // }, // "route": { - // "description": "Name of the route resource to return.", + // "description": "Name of the Route resource to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -30756,7 +30265,7 @@ type RoutesInsertCall struct { ctx_ context.Context } -// Insert: Creates a route resource in the specified project using the +// Insert: Creates a Route resource in the specified project using the // data included in the request. // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { @@ -30766,23 +30275,6 @@ func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RoutesInsertCall) QuotaUser(quotaUser string) *RoutesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RoutesInsertCall) UserIP(userIP string) *RoutesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -30828,7 +30320,8 @@ func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -30857,7 +30350,7 @@ func (c *RoutesInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a route resource in the specified project using the data included in the request.", + // "description": "Creates a Route resource in the specified project using the data included in the request.", // "httpMethod": "POST", // "id": "compute.routes.insert", // "parameterOrder": [ @@ -30897,7 +30390,7 @@ type RoutesListCall struct { ctx_ context.Context } -// List: Retrieves the list of route resources available to the +// List: Retrieves the list of Route resources available to the // specified project. // For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list func (r *RoutesService) List(project string) *RoutesListCall { @@ -30920,19 +30413,20 @@ func (r *RoutesService) List(project string) *RoutesListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *RoutesListCall) Filter(filter string) *RoutesListCall { c.urlParams_.Set("filter", filter) @@ -30940,10 +30434,10 @@ func (c *RoutesListCall) Filter(filter string) *RoutesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -30957,23 +30451,6 @@ func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *RoutesListCall) QuotaUser(quotaUser string) *RoutesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *RoutesListCall) UserIP(userIP string) *RoutesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31026,7 +30503,8 @@ func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) { // 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() (*RouteList, error) { +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 { @@ -31055,7 +30533,7 @@ func (c *RoutesListCall) Do() (*RouteList, error) { } return ret, nil // { - // "description": "Retrieves the list of route resources available to the specified project.", + // "description": "Retrieves the list of Route resources available to the specified project.", // "httpMethod": "GET", // "id": "compute.routes.list", // "parameterOrder": [ @@ -31063,13 +30541,13 @@ func (c *RoutesListCall) Do() (*RouteList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -31102,6 +30580,27 @@ func (c *RoutesListCall) Do() (*RouteList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.snapshots.delete": type SnapshotsDeleteCall struct { @@ -31127,23 +30626,6 @@ func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDel return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *SnapshotsDeleteCall) QuotaUser(quotaUser string) *SnapshotsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *SnapshotsDeleteCall) UserIP(userIP string) *SnapshotsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31184,7 +30666,8 @@ func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -31259,7 +30742,8 @@ type SnapshotsGetCall struct { ctx_ context.Context } -// Get: Returns the specified Snapshot resource. +// Get: Returns the specified Snapshot resource. Get a list of available +// snapshots by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -31268,23 +30752,6 @@ func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCal return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *SnapshotsGetCall) QuotaUser(quotaUser string) *SnapshotsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *SnapshotsGetCall) UserIP(userIP string) *SnapshotsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31338,7 +30805,8 @@ func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*Snapshot, error) { +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 { @@ -31367,7 +30835,7 @@ func (c *SnapshotsGetCall) Do() (*Snapshot, error) { } return ret, nil // { - // "description": "Returns the specified Snapshot resource.", + // "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.", // "httpMethod": "GET", // "id": "compute.snapshots.get", // "parameterOrder": [ @@ -31436,19 +30904,20 @@ func (r *SnapshotsService) List(project string) *SnapshotsListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { c.urlParams_.Set("filter", filter) @@ -31456,10 +30925,10 @@ func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -31473,23 +30942,6 @@ func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *SnapshotsListCall) QuotaUser(quotaUser string) *SnapshotsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *SnapshotsListCall) UserIP(userIP string) *SnapshotsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31542,7 +30994,8 @@ func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) { // 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() (*SnapshotList, error) { +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 { @@ -31579,13 +31032,13 @@ func (c *SnapshotsListCall) Do() (*SnapshotList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -31618,6 +31071,27 @@ func (c *SnapshotsListCall) Do() (*SnapshotList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.sslCertificates.delete": type SslCertificatesDeleteCall struct { @@ -31636,23 +31110,6 @@ func (r *SslCertificatesService) Delete(project string, sslCertificate string) * return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *SslCertificatesDeleteCall) QuotaUser(quotaUser string) *SslCertificatesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *SslCertificatesDeleteCall) UserIP(userIP string) *SslCertificatesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31693,7 +31150,8 @@ func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -31768,7 +31226,8 @@ type SslCertificatesGetCall struct { ctx_ context.Context } -// Get: Returns the specified SslCertificate resource. +// Get: Returns the specified SslCertificate resource. Get a list of +// available SSL certificates by making a list() request. func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall { c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -31776,23 +31235,6 @@ func (r *SslCertificatesService) Get(project string, sslCertificate string) *Ssl return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *SslCertificatesGetCall) QuotaUser(quotaUser string) *SslCertificatesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *SslCertificatesGetCall) UserIP(userIP string) *SslCertificatesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31846,7 +31288,8 @@ func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*SslCertificate, error) { +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 { @@ -31875,7 +31318,7 @@ func (c *SslCertificatesGetCall) Do() (*SslCertificate, error) { } return ret, nil // { - // "description": "Returns the specified SslCertificate resource.", + // "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.", // "httpMethod": "GET", // "id": "compute.sslCertificates.get", // "parameterOrder": [ @@ -31930,23 +31373,6 @@ func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCerti return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *SslCertificatesInsertCall) QuotaUser(quotaUser string) *SslCertificatesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *SslCertificatesInsertCall) UserIP(userIP string) *SslCertificatesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -31992,7 +31418,8 @@ func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -32083,19 +31510,20 @@ func (r *SslCertificatesService) List(project string) *SslCertificatesListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall { c.urlParams_.Set("filter", filter) @@ -32103,10 +31531,10 @@ func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -32120,23 +31548,6 @@ func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesLi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *SslCertificatesListCall) QuotaUser(quotaUser string) *SslCertificatesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *SslCertificatesListCall) UserIP(userIP string) *SslCertificatesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32189,7 +31600,8 @@ func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) // returned 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() (*SslCertificateList, error) { +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 { @@ -32226,13 +31638,13 @@ func (c *SslCertificatesListCall) Do() (*SslCertificateList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -32265,6 +31677,896 @@ func (c *SslCertificatesListCall) Do() (*SslCertificateList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.subnetworks.aggregatedList": + +type SubnetworksAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context +} + +// AggregatedList: Retrieves an aggregated list of subnetworks. +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": Sets a filter expression +// for filtering listed resources, in the form filter={expression}. 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 filter=name ne +// example-instance. +// +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. +// +// The Beta API also supports filtering on multiple expressions by +// providing 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. +func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. +func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a 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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall { + c.ctx_ = ctx + return c +} + +func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/subnetworks") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + req.Header.Set("If-None-Match", c.ifNoneMatch_) + } + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.subnetworks.aggregatedList" call. +// Exactly one of *SubnetworkAggregatedList or error will be non-nil. +// 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SubnetworkAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of subnetworks.", + // "httpMethod": "GET", + // "id": "compute.subnetworks.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{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" + // ] + // } + +} + +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.subnetworks.delete": + +type SubnetworksDeleteCall struct { + s *Service + project string + region string + subnetwork string + urlParams_ gensupport.URLParams + ctx_ context.Context +} + +// Delete: Deletes the specified subnetwork. +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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall { + c.ctx_ = ctx + return c +} + +func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "subnetwork": c.subnetwork, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.subnetworks.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "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 delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.subnetworks.get": + +type SubnetworksGetCall struct { + s *Service + project string + region string + subnetwork string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context +} + +// Get: Returns the specified subnetwork. Get a list of available +// subnetworks list() request. +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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall { + c.ctx_ = ctx + return c +} + +func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "subnetwork": c.subnetwork, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + req.Header.Set("If-None-Match", c.ifNoneMatch_) + } + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.subnetworks.get" call. +// Exactly one of *Subnetwork or error will be non-nil. 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Subnetwork{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.", + // "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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "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])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{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" + // ] + // } + +} + +// method id "compute.subnetworks.insert": + +type SubnetworksInsertCall struct { + s *Service + project string + region string + subnetwork *Subnetwork + urlParams_ gensupport.URLParams + ctx_ context.Context +} + +// Insert: Creates a subnetwork in the specified project using the data +// included in the 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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall { + c.ctx_ = ctx + return c +} + +func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork) + if err != nil { + return nil, err + } + ctype := "application/json" + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.subnetworks.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a subnetwork in the specified project using the data included in the request.", + // "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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "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": "{project}/regions/{region}/subnetworks", + // "request": { + // "$ref": "Subnetwork" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.subnetworks.list": + +type SubnetworksListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context +} + +// List: Retrieves a list of subnetworks available to the specified +// project. +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": Sets a filter expression +// for filtering listed resources, in the form filter={expression}. 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 filter=name ne +// example-instance. +// +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. +// +// The Beta API also supports filtering on multiple expressions by +// providing 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. +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. +func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a 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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall { + c.ctx_ = ctx + return c +} + +func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + req.Header.Set("If-None-Match", c.ifNoneMatch_) + } + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "compute.subnetworks.list" call. +// Exactly one of *SubnetworkList or error will be non-nil. 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SubnetworkList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of subnetworks available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.subnetworks.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "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": "{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" + // ] + // } + +} + +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetHttpProxies.delete": type TargetHttpProxiesDeleteCall struct { @@ -32284,23 +32586,6 @@ func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpProxiesDeleteCall) QuotaUser(quotaUser string) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpProxiesDeleteCall) UserIP(userIP string) *TargetHttpProxiesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32341,7 +32626,8 @@ func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -32416,7 +32702,8 @@ type TargetHttpProxiesGetCall struct { ctx_ context.Context } -// Get: Returns the specified TargetHttpProxy resource. +// Get: Returns the specified TargetHttpProxy resource. Get a list of +// available target HTTP proxies by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -32425,23 +32712,6 @@ func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) * return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpProxiesGetCall) QuotaUser(quotaUser string) *TargetHttpProxiesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpProxiesGetCall) UserIP(userIP string) *TargetHttpProxiesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32495,7 +32765,8 @@ func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) // 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() (*TargetHttpProxy, error) { +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 { @@ -32524,7 +32795,7 @@ func (c *TargetHttpProxiesGetCall) Do() (*TargetHttpProxy, error) { } return ret, nil // { - // "description": "Returns the specified TargetHttpProxy resource.", + // "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.", // "httpMethod": "GET", // "id": "compute.targetHttpProxies.get", // "parameterOrder": [ @@ -32580,23 +32851,6 @@ func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *Targe return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpProxiesInsertCall) QuotaUser(quotaUser string) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpProxiesInsertCall) UserIP(userIP string) *TargetHttpProxiesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32642,7 +32896,8 @@ func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -32734,19 +32989,20 @@ func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCa // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall { c.urlParams_.Set("filter", filter) @@ -32754,10 +33010,10 @@ func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesList } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -32771,23 +33027,6 @@ func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpProxiesListCall) QuotaUser(quotaUser string) *TargetHttpProxiesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpProxiesListCall) UserIP(userIP string) *TargetHttpProxiesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -32840,7 +33079,8 @@ func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error // returned 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() (*TargetHttpProxyList, error) { +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 { @@ -32877,13 +33117,13 @@ func (c *TargetHttpProxiesListCall) Do() (*TargetHttpProxyList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -32916,6 +33156,27 @@ func (c *TargetHttpProxiesListCall) Do() (*TargetHttpProxyList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetHttpProxies.setUrlMap": type TargetHttpProxiesSetUrlMapCall struct { @@ -32937,23 +33198,6 @@ func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy str return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpProxiesSetUrlMapCall) QuotaUser(quotaUser string) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpProxiesSetUrlMapCall) UserIP(userIP string) *TargetHttpProxiesSetUrlMapCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33000,7 +33244,8 @@ func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -33045,7 +33290,7 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do() (*Operation, error) { // "type": "string" // }, // "targetHttpProxy": { - // "description": "Name of the TargetHttpProxy resource whose URL map is to be set.", + // "description": "Name of the TargetHttpProxy to set a URL map for.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -33085,23 +33330,6 @@ func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy stri return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpsProxiesDeleteCall) QuotaUser(quotaUser string) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpsProxiesDeleteCall) UserIP(userIP string) *TargetHttpsProxiesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33142,7 +33370,8 @@ func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, er // 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() (*Operation, error) { +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 { @@ -33217,7 +33446,8 @@ type TargetHttpsProxiesGetCall struct { ctx_ context.Context } -// Get: Returns the specified TargetHttpsProxy resource. +// Get: Returns the specified TargetHttpsProxy resource. Get a list of +// available target HTTPS proxies by making a list() request. func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall { c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -33225,23 +33455,6 @@ func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpsProxiesGetCall) QuotaUser(quotaUser string) *TargetHttpsProxiesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpsProxiesGetCall) UserIP(userIP string) *TargetHttpsProxiesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33295,7 +33508,8 @@ func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error // returned 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() (*TargetHttpsProxy, error) { +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 { @@ -33324,7 +33538,7 @@ func (c *TargetHttpsProxiesGetCall) Do() (*TargetHttpsProxy, error) { } return ret, nil // { - // "description": "Returns the specified TargetHttpsProxy resource.", + // "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.", // "httpMethod": "GET", // "id": "compute.targetHttpsProxies.get", // "parameterOrder": [ @@ -33379,23 +33593,6 @@ func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *Tar return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpsProxiesInsertCall) QuotaUser(quotaUser string) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpsProxiesInsertCall) UserIP(userIP string) *TargetHttpsProxiesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33441,7 +33638,8 @@ func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, er // 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() (*Operation, error) { +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 { @@ -33532,19 +33730,20 @@ func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesList // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall { c.urlParams_.Set("filter", filter) @@ -33552,10 +33751,10 @@ func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesLi } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -33569,23 +33768,6 @@ func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsPro return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpsProxiesListCall) QuotaUser(quotaUser string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpsProxiesListCall) UserIP(userIP string) *TargetHttpsProxiesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33638,7 +33820,8 @@ func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, erro // returned 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() (*TargetHttpsProxyList, error) { +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 { @@ -33675,13 +33858,13 @@ func (c *TargetHttpsProxiesListCall) Do() (*TargetHttpsProxyList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -33714,6 +33897,27 @@ func (c *TargetHttpsProxiesListCall) Do() (*TargetHttpsProxyList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetHttpsProxies.setSslCertificates": type TargetHttpsProxiesSetSslCertificatesCall struct { @@ -33734,23 +33938,6 @@ func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHtt return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpsProxiesSetSslCertificatesCall) QuotaUser(quotaUser string) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpsProxiesSetSslCertificatesCall) UserIP(userIP string) *TargetHttpsProxiesSetSslCertificatesCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33797,7 +33984,8 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http. // 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() (*Operation, error) { +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 { @@ -33842,7 +34030,7 @@ func (c *TargetHttpsProxiesSetSslCertificatesCall) Do() (*Operation, error) { // "type": "string" // }, // "targetHttpsProxy": { - // "description": "Name of the TargetHttpsProxy resource whose SSLCertificate is to be set.", + // "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -33884,23 +34072,6 @@ func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy s return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetHttpsProxiesSetUrlMapCall) QuotaUser(quotaUser string) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetHttpsProxiesSetUrlMapCall) UserIP(userIP string) *TargetHttpsProxiesSetUrlMapCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -33947,7 +34118,8 @@ func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -34024,8 +34196,7 @@ type TargetInstancesAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of target instances grouped by -// scope. +// AggregatedList: Retrieves an aggregated list of target instances. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -34047,19 +34218,20 @@ func (r *TargetInstancesService) AggregatedList(project string) *TargetInstances // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -34067,10 +34239,10 @@ func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstanc } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -34084,23 +34256,6 @@ func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetI return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetInstancesAggregatedListCall) QuotaUser(quotaUser string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetInstancesAggregatedListCall) UserIP(userIP string) *TargetInstancesAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34153,7 +34308,8 @@ func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Respons // response was returned 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() (*TargetInstanceAggregatedList, error) { +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 { @@ -34182,7 +34338,7 @@ func (c *TargetInstancesAggregatedListCall) Do() (*TargetInstanceAggregatedList, } return ret, nil // { - // "description": "Retrieves the list of target instances grouped by scope.", + // "description": "Retrieves an aggregated list of target instances.", // "httpMethod": "GET", // "id": "compute.targetInstances.aggregatedList", // "parameterOrder": [ @@ -34190,13 +34346,13 @@ func (c *TargetInstancesAggregatedListCall) Do() (*TargetInstanceAggregatedList, // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -34229,6 +34385,27 @@ func (c *TargetInstancesAggregatedListCall) Do() (*TargetInstanceAggregatedList, } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetInstances.delete": type TargetInstancesDeleteCall struct { @@ -34250,23 +34427,6 @@ func (r *TargetInstancesService) Delete(project string, zone string, targetInsta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetInstancesDeleteCall) QuotaUser(quotaUser string) *TargetInstancesDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetInstancesDeleteCall) UserIP(userIP string) *TargetInstancesDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34308,7 +34468,8 @@ func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -34392,7 +34553,8 @@ type TargetInstancesGetCall struct { ctx_ context.Context } -// Get: Returns the specified TargetInstance resource. +// Get: Returns the specified TargetInstance resource. Get a list of +// available target instances by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -34402,23 +34564,6 @@ func (r *TargetInstancesService) Get(project string, zone string, targetInstance return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetInstancesGetCall) QuotaUser(quotaUser string) *TargetInstancesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetInstancesGetCall) UserIP(userIP string) *TargetInstancesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34473,7 +34618,8 @@ func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*TargetInstance, error) { +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 { @@ -34502,7 +34648,7 @@ func (c *TargetInstancesGetCall) Do() (*TargetInstance, error) { } return ret, nil // { - // "description": "Returns the specified TargetInstance resource.", + // "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.", // "httpMethod": "GET", // "id": "compute.targetInstances.get", // "parameterOrder": [ @@ -34568,23 +34714,6 @@ func (r *TargetInstancesService) Insert(project string, zone string, targetinsta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetInstancesInsertCall) QuotaUser(quotaUser string) *TargetInstancesInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetInstancesInsertCall) UserIP(userIP string) *TargetInstancesInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34631,7 +34760,8 @@ func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error // 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() (*Operation, error) { +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 { @@ -34709,7 +34839,7 @@ type TargetInstancesListCall struct { ctx_ context.Context } -// List: Retrieves the list of TargetInstance resources available to the +// List: Retrieves a list of TargetInstance resources available to the // specified project and zone. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { @@ -34733,19 +34863,20 @@ func (r *TargetInstancesService) List(project string, zone string) *TargetInstan // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall { c.urlParams_.Set("filter", filter) @@ -34753,10 +34884,10 @@ func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -34770,23 +34901,6 @@ func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesLi return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetInstancesListCall) QuotaUser(quotaUser string) *TargetInstancesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetInstancesListCall) UserIP(userIP string) *TargetInstancesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -34840,7 +34954,8 @@ func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) // returned 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() (*TargetInstanceList, error) { +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 { @@ -34869,7 +34984,7 @@ func (c *TargetInstancesListCall) Do() (*TargetInstanceList, error) { } return ret, nil // { - // "description": "Retrieves the list of TargetInstance resources available to the specified project and zone.", + // "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.", // "httpMethod": "GET", // "id": "compute.targetInstances.list", // "parameterOrder": [ @@ -34878,13 +34993,13 @@ func (c *TargetInstancesListCall) Do() (*TargetInstanceList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -34924,6 +35039,27 @@ func (c *TargetInstancesListCall) Do() (*TargetInstanceList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetPools.addHealthCheck": type TargetPoolsAddHealthCheckCall struct { @@ -34936,7 +35072,7 @@ type TargetPoolsAddHealthCheckCall struct { ctx_ context.Context } -// AddHealthCheck: Adds health check URL to targetPool. +// AddHealthCheck: Adds health check URLs to a target pool. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -34947,23 +35083,6 @@ func (r *TargetPoolsService) AddHealthCheck(project string, region string, targe return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsAddHealthCheckCall) QuotaUser(quotaUser string) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsAddHealthCheckCall) UserIP(userIP string) *TargetPoolsAddHealthCheckCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35011,7 +35130,8 @@ func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, e // 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() (*Operation, error) { +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 { @@ -35040,7 +35160,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Adds health check URL to targetPool.", + // "description": "Adds health check URLs to a target pool.", // "httpMethod": "POST", // "id": "compute.targetPools.addHealthCheck", // "parameterOrder": [ @@ -35050,6 +35170,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do() (*Operation, error) { // ], // "parameters": { // "project": { + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -35063,7 +35184,7 @@ func (c *TargetPoolsAddHealthCheckCall) Do() (*Operation, error) { // "type": "string" // }, // "targetPool": { - // "description": "Name of the TargetPool resource to which health_check_url is to be added.", + // "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])?", // "required": true, @@ -35097,7 +35218,7 @@ type TargetPoolsAddInstanceCall struct { ctx_ context.Context } -// AddInstance: Adds instance URL to targetPool. +// AddInstance: Adds an instance to a target pool. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -35108,23 +35229,6 @@ func (r *TargetPoolsService) AddInstance(project string, region string, targetPo return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsAddInstanceCall) QuotaUser(quotaUser string) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsAddInstanceCall) UserIP(userIP string) *TargetPoolsAddInstanceCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35172,7 +35276,8 @@ func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, erro // 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() (*Operation, error) { +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 { @@ -35201,7 +35306,7 @@ func (c *TargetPoolsAddInstanceCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Adds instance URL to targetPool.", + // "description": "Adds an instance to a target pool.", // "httpMethod": "POST", // "id": "compute.targetPools.addInstance", // "parameterOrder": [ @@ -35211,6 +35316,7 @@ func (c *TargetPoolsAddInstanceCall) Do() (*Operation, error) { // ], // "parameters": { // "project": { + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -35224,7 +35330,7 @@ func (c *TargetPoolsAddInstanceCall) Do() (*Operation, error) { // "type": "string" // }, // "targetPool": { - // "description": "Name of the TargetPool resource to which instance_url is to be added.", + // "description": "Name of the TargetPool resource to add instances to.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -35256,7 +35362,7 @@ type TargetPoolsAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of target pools grouped by scope. +// AggregatedList: Retrieves an aggregated list of target pools. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -35278,19 +35384,20 @@ func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregat // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -35298,10 +35405,10 @@ func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggreg } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -35315,23 +35422,6 @@ func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPools return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsAggregatedListCall) QuotaUser(quotaUser string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsAggregatedListCall) UserIP(userIP string) *TargetPoolsAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35384,7 +35474,8 @@ func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, e // returned 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() (*TargetPoolAggregatedList, error) { +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 { @@ -35413,7 +35504,7 @@ func (c *TargetPoolsAggregatedListCall) Do() (*TargetPoolAggregatedList, error) } return ret, nil // { - // "description": "Retrieves the list of target pools grouped by scope.", + // "description": "Retrieves an aggregated list of target pools.", // "httpMethod": "GET", // "id": "compute.targetPools.aggregatedList", // "parameterOrder": [ @@ -35421,13 +35512,13 @@ func (c *TargetPoolsAggregatedListCall) Do() (*TargetPoolAggregatedList, error) // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -35460,6 +35551,27 @@ func (c *TargetPoolsAggregatedListCall) Do() (*TargetPoolAggregatedList, error) } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetPools.delete": type TargetPoolsDeleteCall struct { @@ -35471,7 +35583,7 @@ type TargetPoolsDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified TargetPool resource. +// Delete: Deletes the specified target pool. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -35481,23 +35593,6 @@ func (r *TargetPoolsService) Delete(project string, region string, targetPool st return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsDeleteCall) QuotaUser(quotaUser string) *TargetPoolsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsDeleteCall) UserIP(userIP string) *TargetPoolsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35539,7 +35634,8 @@ func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -35568,7 +35664,7 @@ func (c *TargetPoolsDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified TargetPool resource.", + // "description": "Deletes the specified target pool.", // "httpMethod": "DELETE", // "id": "compute.targetPools.delete", // "parameterOrder": [ @@ -35623,7 +35719,8 @@ type TargetPoolsGetCall struct { ctx_ context.Context } -// Get: Returns the specified TargetPool resource. +// Get: Returns the specified target pool. Get a list of available +// target pools by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -35633,23 +35730,6 @@ func (r *TargetPoolsService) Get(project string, region string, targetPool strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsGetCall) QuotaUser(quotaUser string) *TargetPoolsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsGetCall) UserIP(userIP string) *TargetPoolsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35704,7 +35784,8 @@ func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*TargetPool, error) { +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 { @@ -35733,7 +35814,7 @@ func (c *TargetPoolsGetCall) Do() (*TargetPool, error) { } return ret, nil // { - // "description": "Returns the specified TargetPool resource.", + // "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.", // "httpMethod": "GET", // "id": "compute.targetPools.get", // "parameterOrder": [ @@ -35790,7 +35871,7 @@ type TargetPoolsGetHealthCall struct { } // GetHealth: Gets the most recent health check results for each IP for -// the given instance that is referenced by given TargetPool. +// the instance that is referenced by the given target pool. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -35801,23 +35882,6 @@ func (r *TargetPoolsService) GetHealth(project string, region string, targetPool return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsGetHealthCall) QuotaUser(quotaUser string) *TargetPoolsGetHealthCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsGetHealthCall) UserIP(userIP string) *TargetPoolsGetHealthCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -35865,7 +35929,8 @@ func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) // returned 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() (*TargetPoolInstanceHealth, error) { +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 { @@ -35894,7 +35959,7 @@ func (c *TargetPoolsGetHealthCall) Do() (*TargetPoolInstanceHealth, error) { } return ret, nil // { - // "description": "Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool.", + // "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.", // "httpMethod": "POST", // "id": "compute.targetPools.getHealth", // "parameterOrder": [ @@ -35904,6 +35969,7 @@ func (c *TargetPoolsGetHealthCall) Do() (*TargetPoolInstanceHealth, error) { // ], // "parameters": { // "project": { + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -35951,8 +36017,8 @@ type TargetPoolsInsertCall struct { ctx_ context.Context } -// Insert: Creates a TargetPool resource in the specified project and -// region using the data included in the request. +// Insert: Creates a target pool in the specified project and region +// using the data included in the request. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -35962,23 +36028,6 @@ func (r *TargetPoolsService) Insert(project string, region string, targetpool *T return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsInsertCall) QuotaUser(quotaUser string) *TargetPoolsInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsInsertCall) UserIP(userIP string) *TargetPoolsInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36025,7 +36074,8 @@ func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -36054,7 +36104,7 @@ func (c *TargetPoolsInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a TargetPool resource in the specified project and region using the data included in the request.", + // "description": "Creates a target pool in the specified project and region using the data included in the request.", // "httpMethod": "POST", // "id": "compute.targetPools.insert", // "parameterOrder": [ @@ -36103,8 +36153,8 @@ type TargetPoolsListCall struct { ctx_ context.Context } -// List: Retrieves the list of TargetPool resources available to the -// specified project and region. +// List: Retrieves a list of target pools available to the specified +// project and region. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -36127,19 +36177,20 @@ func (r *TargetPoolsService) List(project string, region string) *TargetPoolsLis // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { c.urlParams_.Set("filter", filter) @@ -36147,10 +36198,10 @@ func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -36164,23 +36215,6 @@ func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsListCall) QuotaUser(quotaUser string) *TargetPoolsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsListCall) UserIP(userIP string) *TargetPoolsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36234,7 +36268,8 @@ func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) { // 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() (*TargetPoolList, error) { +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 { @@ -36263,7 +36298,7 @@ func (c *TargetPoolsListCall) Do() (*TargetPoolList, error) { } return ret, nil // { - // "description": "Retrieves the list of TargetPool resources available to the specified project and region.", + // "description": "Retrieves a list of target pools available to the specified project and region.", // "httpMethod": "GET", // "id": "compute.targetPools.list", // "parameterOrder": [ @@ -36272,13 +36307,13 @@ func (c *TargetPoolsListCall) Do() (*TargetPoolList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -36318,6 +36353,27 @@ func (c *TargetPoolsListCall) Do() (*TargetPoolList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetPools.removeHealthCheck": type TargetPoolsRemoveHealthCheckCall struct { @@ -36330,7 +36386,7 @@ type TargetPoolsRemoveHealthCheckCall struct { ctx_ context.Context } -// RemoveHealthCheck: Removes health check URL from targetPool. +// RemoveHealthCheck: Removes health check URL from a target pool. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -36341,23 +36397,6 @@ func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, ta return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsRemoveHealthCheckCall) QuotaUser(quotaUser string) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsRemoveHealthCheckCall) UserIP(userIP string) *TargetPoolsRemoveHealthCheckCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36405,7 +36444,8 @@ func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response // 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() (*Operation, error) { +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 { @@ -36434,7 +36474,7 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Removes health check URL from targetPool.", + // "description": "Removes health check URL from a target pool.", // "httpMethod": "POST", // "id": "compute.targetPools.removeHealthCheck", // "parameterOrder": [ @@ -36444,20 +36484,21 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do() (*Operation, error) { // ], // "parameters": { // "project": { + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, // "type": "string" // }, // "region": { - // "description": "Name of the region scoping this request.", + // "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" // }, // "targetPool": { - // "description": "Name of the TargetPool resource to which health_check_url is to be removed.", + // "description": "Name of the target pool to remove health checks from.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -36491,7 +36532,7 @@ type TargetPoolsRemoveInstanceCall struct { ctx_ context.Context } -// RemoveInstance: Removes instance URL from targetPool. +// RemoveInstance: Removes instance URL from a target pool. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -36502,23 +36543,6 @@ func (r *TargetPoolsService) RemoveInstance(project string, region string, targe return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsRemoveInstanceCall) QuotaUser(quotaUser string) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsRemoveInstanceCall) UserIP(userIP string) *TargetPoolsRemoveInstanceCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36566,7 +36590,8 @@ func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, e // 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() (*Operation, error) { +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 { @@ -36595,7 +36620,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Removes instance URL from targetPool.", + // "description": "Removes instance URL from a target pool.", // "httpMethod": "POST", // "id": "compute.targetPools.removeInstance", // "parameterOrder": [ @@ -36605,6 +36630,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do() (*Operation, error) { // ], // "parameters": { // "project": { + // "description": "Project ID for this request.", // "location": "path", // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", // "required": true, @@ -36618,7 +36644,7 @@ func (c *TargetPoolsRemoveInstanceCall) Do() (*Operation, error) { // "type": "string" // }, // "targetPool": { - // "description": "Name of the TargetPool resource to which instance_url is to be removed.", + // "description": "Name of the TargetPool resource to remove instances from.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -36652,7 +36678,7 @@ type TargetPoolsSetBackupCall struct { ctx_ context.Context } -// SetBackup: Changes backup pool configurations. +// SetBackup: Changes a backup target pool's configurations. // For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -36664,29 +36690,12 @@ func (r *TargetPoolsService) SetBackup(project string, region string, targetPool } // FailoverRatio sets the optional parameter "failoverRatio": New -// failoverRatio value for the containing target pool. +// failoverRatio value for the target pool. func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall { c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio)) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetPoolsSetBackupCall) QuotaUser(quotaUser string) *TargetPoolsSetBackupCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetPoolsSetBackupCall) UserIP(userIP string) *TargetPoolsSetBackupCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36734,7 +36743,8 @@ func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) // 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() (*Operation, error) { +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 { @@ -36763,7 +36773,7 @@ func (c *TargetPoolsSetBackupCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Changes backup pool configurations.", + // "description": "Changes a backup target pool's configurations.", // "httpMethod": "POST", // "id": "compute.targetPools.setBackup", // "parameterOrder": [ @@ -36773,7 +36783,7 @@ func (c *TargetPoolsSetBackupCall) Do() (*Operation, error) { // ], // "parameters": { // "failoverRatio": { - // "description": "New failoverRatio value for the containing target pool.", + // "description": "New failoverRatio value for the target pool.", // "format": "float", // "location": "query", // "type": "number" @@ -36793,7 +36803,7 @@ func (c *TargetPoolsSetBackupCall) Do() (*Operation, error) { // "type": "string" // }, // "targetPool": { - // "description": "Name of the TargetPool resource for which the backup is to be set.", + // "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])?", // "required": true, @@ -36825,8 +36835,7 @@ type TargetVpnGatewaysAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of target VPN gateways grouped by -// scope. +// AggregatedList: Retrieves an aggregated list of target VPN gateways. func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall { c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -36847,19 +36856,20 @@ func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGate // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -36867,10 +36877,10 @@ func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGa } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -36884,23 +36894,6 @@ func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *Targe return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetVpnGatewaysAggregatedListCall) QuotaUser(quotaUser string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetVpnGatewaysAggregatedListCall) UserIP(userIP string) *TargetVpnGatewaysAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -36953,7 +36946,8 @@ func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Respo // response was returned 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() (*TargetVpnGatewayAggregatedList, error) { +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 { @@ -36982,7 +36976,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do() (*TargetVpnGatewayAggregatedL } return ret, nil // { - // "description": "Retrieves the list of target VPN gateways grouped by scope.", + // "description": "Retrieves an aggregated list of target VPN gateways.", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.aggregatedList", // "parameterOrder": [ @@ -36990,13 +36984,13 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do() (*TargetVpnGatewayAggregatedL // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -37029,6 +37023,27 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do() (*TargetVpnGatewayAggregatedL } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.targetVpnGateways.delete": type TargetVpnGatewaysDeleteCall struct { @@ -37040,7 +37055,7 @@ type TargetVpnGatewaysDeleteCall struct { ctx_ context.Context } -// Delete: Deletes the specified TargetVpnGateway resource. +// Delete: Deletes the specified target VPN gateway. func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall { c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -37049,23 +37064,6 @@ func (r *TargetVpnGatewaysService) Delete(project string, region string, targetV return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetVpnGatewaysDeleteCall) QuotaUser(quotaUser string) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetVpnGatewaysDeleteCall) UserIP(userIP string) *TargetVpnGatewaysDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37107,7 +37105,8 @@ func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -37136,7 +37135,7 @@ func (c *TargetVpnGatewaysDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the specified TargetVpnGateway resource.", + // "description": "Deletes the specified target VPN gateway.", // "httpMethod": "DELETE", // "id": "compute.targetVpnGateways.delete", // "parameterOrder": [ @@ -37153,14 +37152,14 @@ func (c *TargetVpnGatewaysDeleteCall) Do() (*Operation, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "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 TargetVpnGateway resource to delete.", + // "description": "Name of the target VPN gateway to delete.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -37191,7 +37190,8 @@ type TargetVpnGatewaysGetCall struct { ctx_ context.Context } -// Get: Returns the specified TargetVpnGateway resource. +// Get: Returns the specified target VPN gateway. Get a list of +// available target VPN gateways by making a list() request. func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall { c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -37200,23 +37200,6 @@ func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnG return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetVpnGatewaysGetCall) QuotaUser(quotaUser string) *TargetVpnGatewaysGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetVpnGatewaysGetCall) UserIP(userIP string) *TargetVpnGatewaysGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37271,7 +37254,8 @@ func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) // returned 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() (*TargetVpnGateway, error) { +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 { @@ -37300,7 +37284,7 @@ func (c *TargetVpnGatewaysGetCall) Do() (*TargetVpnGateway, error) { } return ret, nil // { - // "description": "Returns the specified TargetVpnGateway resource.", + // "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.get", // "parameterOrder": [ @@ -37317,14 +37301,14 @@ func (c *TargetVpnGatewaysGetCall) Do() (*TargetVpnGateway, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "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 TargetVpnGateway resource to return.", + // "description": "Name of the target VPN gateway to return.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -37355,8 +37339,8 @@ type TargetVpnGatewaysInsertCall struct { ctx_ context.Context } -// Insert: Creates a TargetVpnGateway resource in the specified project -// and region using the data included in the request. +// Insert: Creates a target VPN gateway in the specified project and +// region using the data included in the request. func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall { c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -37365,23 +37349,6 @@ func (r *TargetVpnGatewaysService) Insert(project string, region string, targetv return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetVpnGatewaysInsertCall) QuotaUser(quotaUser string) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetVpnGatewaysInsertCall) UserIP(userIP string) *TargetVpnGatewaysInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37428,7 +37395,8 @@ func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, err // 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() (*Operation, error) { +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 { @@ -37457,7 +37425,7 @@ func (c *TargetVpnGatewaysInsertCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a TargetVpnGateway resource in the specified project and region using the data included in the request.", + // "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.", // "httpMethod": "POST", // "id": "compute.targetVpnGateways.insert", // "parameterOrder": [ @@ -37473,7 +37441,7 @@ func (c *TargetVpnGatewaysInsertCall) Do() (*Operation, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -37506,8 +37474,8 @@ type TargetVpnGatewaysListCall struct { ctx_ context.Context } -// List: Retrieves the list of TargetVpnGateway resources available to -// the specified project and region. +// List: Retrieves a list of target VPN gateways available to the +// specified project and region. func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall { c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -37529,19 +37497,20 @@ func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVp // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall { c.urlParams_.Set("filter", filter) @@ -37549,10 +37518,10 @@ func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysList } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -37566,23 +37535,6 @@ func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewa return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *TargetVpnGatewaysListCall) QuotaUser(quotaUser string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *TargetVpnGatewaysListCall) UserIP(userIP string) *TargetVpnGatewaysListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37636,7 +37588,8 @@ func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error // returned 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() (*TargetVpnGatewayList, error) { +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 { @@ -37665,7 +37618,7 @@ func (c *TargetVpnGatewaysListCall) Do() (*TargetVpnGatewayList, error) { } return ret, nil // { - // "description": "Retrieves the list of TargetVpnGateway resources available to the specified project and region.", + // "description": "Retrieves a list of target VPN gateways available to the specified project and region.", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.list", // "parameterOrder": [ @@ -37674,13 +37627,13 @@ func (c *TargetVpnGatewaysListCall) Do() (*TargetVpnGatewayList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -37700,7 +37653,7 @@ func (c *TargetVpnGatewaysListCall) Do() (*TargetVpnGatewayList, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -37720,6 +37673,27 @@ func (c *TargetVpnGatewaysListCall) Do() (*TargetVpnGatewayList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.urlMaps.delete": type UrlMapsDeleteCall struct { @@ -37739,23 +37713,6 @@ func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCal return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *UrlMapsDeleteCall) QuotaUser(quotaUser string) *UrlMapsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *UrlMapsDeleteCall) UserIP(userIP string) *UrlMapsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37796,7 +37753,8 @@ func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -37871,7 +37829,8 @@ type UrlMapsGetCall struct { ctx_ context.Context } -// Get: Returns the specified UrlMap resource. +// Get: Returns the specified UrlMap resource. Get a list of available +// URL maps by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -37880,23 +37839,6 @@ func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *UrlMapsGetCall) QuotaUser(quotaUser string) *UrlMapsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *UrlMapsGetCall) UserIP(userIP string) *UrlMapsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -37950,7 +37892,8 @@ func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) { // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *UrlMapsGetCall) Do() (*UrlMap, error) { +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 { @@ -37979,7 +37922,7 @@ func (c *UrlMapsGetCall) Do() (*UrlMap, error) { } return ret, nil // { - // "description": "Returns the specified UrlMap resource.", + // "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.", // "httpMethod": "GET", // "id": "compute.urlMaps.get", // "parameterOrder": [ @@ -38035,23 +37978,6 @@ func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCa return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *UrlMapsInsertCall) QuotaUser(quotaUser string) *UrlMapsInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *UrlMapsInsertCall) UserIP(userIP string) *UrlMapsInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38097,7 +38023,8 @@ func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -38189,19 +38116,20 @@ func (r *UrlMapsService) List(project string) *UrlMapsListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { c.urlParams_.Set("filter", filter) @@ -38209,10 +38137,10 @@ func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -38226,23 +38154,6 @@ func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *UrlMapsListCall) QuotaUser(quotaUser string) *UrlMapsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *UrlMapsListCall) UserIP(userIP string) *UrlMapsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38295,7 +38206,8 @@ func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) { // 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() (*UrlMapList, error) { +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 { @@ -38332,13 +38244,13 @@ func (c *UrlMapsListCall) Do() (*UrlMapList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -38371,6 +38283,27 @@ func (c *UrlMapsListCall) Do() (*UrlMapList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.urlMaps.patch": type UrlMapsPatchCall struct { @@ -38382,7 +38315,7 @@ type UrlMapsPatchCall struct { ctx_ context.Context } -// Patch: Update the entire content of the UrlMap resource. This method +// Patch: Updates the entire content of the UrlMap resource. This method // supports patch semantics. // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { @@ -38393,23 +38326,6 @@ func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *U return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *UrlMapsPatchCall) QuotaUser(quotaUser string) *UrlMapsPatchCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *UrlMapsPatchCall) UserIP(userIP string) *UrlMapsPatchCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38456,7 +38372,8 @@ func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -38485,7 +38402,7 @@ func (c *UrlMapsPatchCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Update the entire content of the UrlMap resource. This method supports patch semantics.", + // "description": "Updates the entire content of the UrlMap resource. This method supports patch semantics.", // "httpMethod": "PATCH", // "id": "compute.urlMaps.patch", // "parameterOrder": [ @@ -38534,7 +38451,7 @@ type UrlMapsUpdateCall struct { ctx_ context.Context } -// Update: Update the entire content of the UrlMap resource. +// Update: Updates the entire content of the UrlMap resource. // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -38544,23 +38461,6 @@ func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) * return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *UrlMapsUpdateCall) QuotaUser(quotaUser string) *UrlMapsUpdateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *UrlMapsUpdateCall) UserIP(userIP string) *UrlMapsUpdateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38607,7 +38507,8 @@ func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -38636,7 +38537,7 @@ func (c *UrlMapsUpdateCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Update the entire content of the UrlMap resource.", + // "description": "Updates the entire content of the UrlMap resource.", // "httpMethod": "PUT", // "id": "compute.urlMaps.update", // "parameterOrder": [ @@ -38685,7 +38586,7 @@ type UrlMapsValidateCall struct { ctx_ context.Context } -// Validate: Run static validation for the UrlMap. In particular, the +// 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. // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate @@ -38697,23 +38598,6 @@ func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidate return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *UrlMapsValidateCall) QuotaUser(quotaUser string) *UrlMapsValidateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *UrlMapsValidateCall) UserIP(userIP string) *UrlMapsValidateCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38760,7 +38644,8 @@ func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) { // returned 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() (*UrlMapsValidateResponse, error) { +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 { @@ -38789,7 +38674,7 @@ func (c *UrlMapsValidateCall) Do() (*UrlMapsValidateResponse, error) { } return ret, nil // { - // "description": "Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + // "description": "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.", // "httpMethod": "POST", // "id": "compute.urlMaps.validate", // "parameterOrder": [ @@ -38837,7 +38722,7 @@ type VpnTunnelsAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of VPN tunnels grouped by scope. +// AggregatedList: Retrieves an aggregated list of VPN tunnels. func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall { c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -38858,19 +38743,20 @@ func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregated // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall { c.urlParams_.Set("filter", filter) @@ -38878,10 +38764,10 @@ func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregat } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -38895,23 +38781,6 @@ func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAg return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *VpnTunnelsAggregatedListCall) QuotaUser(quotaUser string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *VpnTunnelsAggregatedListCall) UserIP(userIP string) *VpnTunnelsAggregatedListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -38964,7 +38833,8 @@ func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, er // returned 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() (*VpnTunnelAggregatedList, error) { +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 { @@ -38993,7 +38863,7 @@ func (c *VpnTunnelsAggregatedListCall) Do() (*VpnTunnelAggregatedList, error) { } return ret, nil // { - // "description": "Retrieves the list of VPN tunnels grouped by scope.", + // "description": "Retrieves an aggregated list of VPN tunnels.", // "httpMethod": "GET", // "id": "compute.vpnTunnels.aggregatedList", // "parameterOrder": [ @@ -39001,13 +38871,13 @@ func (c *VpnTunnelsAggregatedListCall) Do() (*VpnTunnelAggregatedList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -39040,6 +38910,27 @@ func (c *VpnTunnelsAggregatedListCall) Do() (*VpnTunnelAggregatedList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.vpnTunnels.delete": type VpnTunnelsDeleteCall struct { @@ -39060,23 +38951,6 @@ func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel stri return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *VpnTunnelsDeleteCall) QuotaUser(quotaUser string) *VpnTunnelsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *VpnTunnelsDeleteCall) UserIP(userIP string) *VpnTunnelsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39118,7 +38992,8 @@ func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -39164,7 +39039,7 @@ func (c *VpnTunnelsDeleteCall) Do() (*Operation, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -39202,7 +39077,8 @@ type VpnTunnelsGetCall struct { ctx_ context.Context } -// Get: Returns the specified VpnTunnel resource. +// Get: Returns the specified VpnTunnel resource. Get a list of +// available VPN tunnels by making a list() request. func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall { c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39211,23 +39087,6 @@ func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *VpnTunnelsGetCall) QuotaUser(quotaUser string) *VpnTunnelsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *VpnTunnelsGetCall) UserIP(userIP string) *VpnTunnelsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39282,7 +39141,8 @@ func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*VpnTunnel, error) { +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 { @@ -39311,7 +39171,7 @@ func (c *VpnTunnelsGetCall) Do() (*VpnTunnel, error) { } return ret, nil // { - // "description": "Returns the specified VpnTunnel resource.", + // "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.", // "httpMethod": "GET", // "id": "compute.vpnTunnels.get", // "parameterOrder": [ @@ -39328,7 +39188,7 @@ func (c *VpnTunnelsGetCall) Do() (*VpnTunnel, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -39376,23 +39236,6 @@ func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *Vpn return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *VpnTunnelsInsertCall) QuotaUser(quotaUser string) *VpnTunnelsInsertCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *VpnTunnelsInsertCall) UserIP(userIP string) *VpnTunnelsInsertCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39439,7 +39282,8 @@ func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -39484,7 +39328,7 @@ func (c *VpnTunnelsInsertCall) Do() (*Operation, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -39517,7 +39361,7 @@ type VpnTunnelsListCall struct { ctx_ context.Context } -// List: Retrieves the list of VpnTunnel resources contained in the +// List: Retrieves a list of VpnTunnel resources contained in the // specified project and region. func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall { c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -39540,19 +39384,20 @@ func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListC // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall { c.urlParams_.Set("filter", filter) @@ -39560,10 +39405,10 @@ func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -39577,23 +39422,6 @@ func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *VpnTunnelsListCall) QuotaUser(quotaUser string) *VpnTunnelsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *VpnTunnelsListCall) UserIP(userIP string) *VpnTunnelsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39647,7 +39475,8 @@ func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) { // 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() (*VpnTunnelList, error) { +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 { @@ -39676,7 +39505,7 @@ func (c *VpnTunnelsListCall) Do() (*VpnTunnelList, error) { } return ret, nil // { - // "description": "Retrieves the list of VpnTunnel resources contained in the specified project and region.", + // "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.", // "httpMethod": "GET", // "id": "compute.vpnTunnels.list", // "parameterOrder": [ @@ -39685,13 +39514,13 @@ func (c *VpnTunnelsListCall) Do() (*VpnTunnelList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -39711,7 +39540,7 @@ func (c *VpnTunnelsListCall) Do() (*VpnTunnelList, error) { // "type": "string" // }, // "region": { - // "description": "The name of the region for this request.", + // "description": "Name of the region for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -39731,6 +39560,27 @@ func (c *VpnTunnelsListCall) Do() (*VpnTunnelList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.zoneOperations.delete": type ZoneOperationsDeleteCall struct { @@ -39752,23 +39602,6 @@ func (r *ZoneOperationsService) Delete(project string, zone string, operation st return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ZoneOperationsDeleteCall) QuotaUser(quotaUser string) *ZoneOperationsDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ZoneOperationsDeleteCall) UserIP(userIP string) *ZoneOperationsDeleteCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39804,7 +39637,8 @@ func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) } // Do executes the "compute.zoneOperations.delete" call. -func (c *ZoneOperationsDeleteCall) Do() error { +func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if err != nil { return err @@ -39839,7 +39673,7 @@ func (c *ZoneOperationsDeleteCall) Do() error { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -39877,23 +39711,6 @@ func (r *ZoneOperationsService) Get(project string, zone string, operation strin return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ZoneOperationsGetCall) QuotaUser(quotaUser string) *ZoneOperationsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ZoneOperationsGetCall) UserIP(userIP string) *ZoneOperationsGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -39948,7 +39765,8 @@ func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { // 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() (*Operation, error) { +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 { @@ -40001,7 +39819,7 @@ func (c *ZoneOperationsGetCall) Do() (*Operation, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -40032,7 +39850,7 @@ type ZoneOperationsListCall struct { ctx_ context.Context } -// List: Retrieves the list of Operation resources contained within the +// List: Retrieves a list of Operation resources contained within the // specified zone. // For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { @@ -40056,19 +39874,20 @@ func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperation // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { c.urlParams_.Set("filter", filter) @@ -40076,10 +39895,10 @@ func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -40093,23 +39912,6 @@ func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsList return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ZoneOperationsListCall) QuotaUser(quotaUser string) *ZoneOperationsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ZoneOperationsListCall) UserIP(userIP string) *ZoneOperationsListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -40163,7 +39965,8 @@ func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { // 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() (*OperationList, error) { +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 { @@ -40192,7 +39995,7 @@ func (c *ZoneOperationsListCall) Do() (*OperationList, error) { } return ret, nil // { - // "description": "Retrieves the list of Operation resources contained within the specified zone.", + // "description": "Retrieves a list of Operation resources contained within the specified zone.", // "httpMethod": "GET", // "id": "compute.zoneOperations.list", // "parameterOrder": [ @@ -40201,13 +40004,13 @@ func (c *ZoneOperationsListCall) Do() (*OperationList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -40227,7 +40030,7 @@ func (c *ZoneOperationsListCall) Do() (*OperationList, error) { // "type": "string" // }, // "zone": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the zone for request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -40247,6 +40050,27 @@ func (c *ZoneOperationsListCall) Do() (*OperationList, error) { } +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.zones.get": type ZonesGetCall struct { @@ -40258,7 +40082,8 @@ type ZonesGetCall struct { ctx_ context.Context } -// Get: Returns the specified zone resource. +// Get: Returns the specified Zone resource. Get a list of available +// zones by making a list() request. // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -40267,23 +40092,6 @@ func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ZonesGetCall) QuotaUser(quotaUser string) *ZonesGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ZonesGetCall) UserIP(userIP string) *ZonesGetCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -40337,7 +40145,8 @@ func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) { // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ZonesGetCall) Do() (*Zone, error) { +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 { @@ -40366,7 +40175,7 @@ func (c *ZonesGetCall) Do() (*Zone, error) { } return ret, nil // { - // "description": "Returns the specified zone resource.", + // "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.", // "httpMethod": "GET", // "id": "compute.zones.get", // "parameterOrder": [ @@ -40412,7 +40221,7 @@ type ZonesListCall struct { ctx_ context.Context } -// List: Retrieves the list of zone resources available to the specified +// List: Retrieves the list of Zone resources available to the specified // project. // For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list func (r *ZonesService) List(project string) *ZonesListCall { @@ -40435,19 +40244,20 @@ func (r *ZonesService) List(project string) *ZonesListCall { // as a regular expression using RE2 syntax. The literal value must // match the entire field. // -// For example, filter=name ne example-instance. +// For example, to filter for instances that do not have a name of +// example-instance, you would use filter=name ne +// example-instance. // -// Compute Engine Beta API Only: If you use filtering in the Beta API, -// you can also filter on nested fields. For example, you could filter -// on instances that have set the scheduling.automaticRestart field to -// true. In particular, use filtering on nested fields to take advantage -// of instance labels to organize and filter results based on label -// values. +// Compute Engine Beta API Only: When filtering in the Beta API, you can +// also 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. // // The Beta API also supports filtering on multiple expressions by // providing 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 +// Multiple expressions are treated as AND expressions, meaning that // resources must match all expressions to pass the filters. func (c *ZonesListCall) Filter(filter string) *ZonesListCall { c.urlParams_.Set("filter", filter) @@ -40455,10 +40265,10 @@ func (c *ZonesListCall) Filter(filter string) *ZonesListCall { } // MaxResults sets the optional parameter "maxResults": The maximum -// number of results per page that Compute Engine should return. If the -// number of available results is larger than maxResults, Compute Engine -// returns a nextPageToken that can be used to get the next page of -// results in subsequent list requests. +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c @@ -40472,23 +40282,6 @@ func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -// Overrides userIp if both are provided. -func (c *ZonesListCall) QuotaUser(quotaUser string) *ZonesListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - -// UserIP sets the optional parameter "userIp": IP address of the site -// where the request originates. Use this if you want to enforce -// per-user limits. -func (c *ZonesListCall) UserIP(userIP string) *ZonesListCall { - c.urlParams_.Set("userIp", userIP) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -40541,7 +40334,8 @@ func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) { // 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() (*ZoneList, error) { +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 { @@ -40570,7 +40364,7 @@ func (c *ZonesListCall) Do() (*ZoneList, error) { } return ret, nil // { - // "description": "Retrieves the list of zone resources available to the specified project.", + // "description": "Retrieves the list of Zone resources available to the specified project.", // "httpMethod": "GET", // "id": "compute.zones.list", // "parameterOrder": [ @@ -40578,13 +40372,13 @@ func (c *ZonesListCall) Do() (*ZoneList, error) { // ], // "parameters": { // "filter": { - // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", + // "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe 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.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: When filtering in the Beta API, you can also 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.\n\nThe Beta API also supports filtering on multiple expressions by providing 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.", // "location": "query", // "type": "string" // }, // "maxResults": { // "default": "500", - // "description": "The maximum number of results per page that Compute Engine should return. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.", // "format": "uint32", // "location": "query", // "maximum": "500", @@ -40616,3 +40410,24 @@ func (c *ZonesListCall) Do() (*ZoneList, error) { // } } + +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json index 9041b8cf290..f9f5ba1df9a 100644 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ b/vendor/google.golang.org/api/container/v1/container-api.json @@ -1,13 +1,13 @@ { "kind": "discovery#restDescription", - "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/FD4oCwspiZqN6eCjsBmxDzsj5B8\"", + "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/cpP4K9eaLrLwMGtsdl5oXjxb8rw\"", "discoveryVersion": "v1", "id": "container:v1", "name": "container", "version": "v1", - "revision": "20150603", + "revision": "20160421", "title": "Google Container Engine API", - "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", + "description": "Builds and manages clusters that run container-based applications, powered by open source Kubernetes technology.", "ownerDomain": "google.com", "ownerName": "Google", "icons": { @@ -17,7 +17,7 @@ "documentationLink": "https://cloud.google.com/container-engine/", "protocol": "rest", "baseUrl": "https://container.googleapis.com/", - "basePath": "/", + "basePath": "", "rootUrl": "https://container.googleapis.com/", "servicePath": "", "batchPath": "batch", @@ -121,6 +121,13 @@ "items": { "$ref": "Cluster" } + }, + "missingZones": { + "type": "array", + "description": "If any zones are listed here, the list of clusters returned may be missing those zones.", + "items": { + "type": "string" + } } } }, @@ -139,33 +146,55 @@ }, "initialNodeCount": { "type": "integer", - "description": "The number of nodes to create in this cluster. You must ensure that your Compute Engine [resource quota](/compute/docs/resource-quotas) is sufficient for this number of instances. You must also have available firewall and routes quota.", + "description": "The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota 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.", "format": "int32" }, "nodeConfig": { "$ref": "NodeConfig", - "description": "Parameters used in creating the cluster's nodes. See the descriptions of the child properties of `nodeConfig`. If unspecified, the defaults for all child properties are used." + "description": "Parameters used in creating the cluster's nodes. See `nodeConfig` for the description of its properties. 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. If unspecified, the defaults are used." }, "masterAuth": { "$ref": "MasterAuth", - "description": "The authentication information for accessing the master." + "description": "The authentication information for accessing the master endpoint." }, "loggingService": { "type": "string", - "description": "The logging service that the cluster should write logs to. Currently available options: * \"logging.googleapis.com\" - the Google Cloud Logging service * \"none\" - no logs will be exported from the cluster * \"\" - default value; the default is \"logging.googleapis.com\"" + "description": "The logging service the cluster should use to write logs. Currently available options: * `logging.googleapis.com` - the Google Cloud Logging service. * `none` - no logs will be exported from the cluster. * if left as an empty string,`logging.googleapis.com` will be used." }, "monitoringService": { "type": "string", - "description": "The monitoring service that the cluster should write metrics to. Currently available options: * \"monitoring.googleapis.com\" - the Google Cloud Monitoring service * \"none\" - no metrics will be exported from the cluster * \"\" - default value; the default is \"monitoring.googleapis.com\"" + "description": "The monitoring service the cluster should use to write metrics. Currently available options: * `monitoring.googleapis.com` - the Google Cloud Monitoring service. * `none` - no metrics will be exported from the cluster. * if left as an empty string, `monitoring.googleapis.com` will be used." }, "network": { "type": "string", - "description": "The name of the Google Compute Engine [network](/compute/docs/networking#networks_1) to which the cluster is connected. If left unspecified, the \"default\" network will be used." + "description": "The name of the Google Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. If left unspecified, the `default` network will be used." }, "clusterIpv4Cidr": { "type": "string", "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`." }, + "addonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "subnetwork": { + "type": "string", + "description": "The name of the Google Compute Engine [subnetwork](/compute/docs/subnetworks) to which the cluster is connected." + }, + "nodePools": { + "type": "array", + "description": "The node pools associated with this cluster. When creating a new cluster, only a single node pool should be specified. This field should not be set if \"node_config\" or \"initial_node_count\" are specified.", + "items": { + "$ref": "NodePool" + } + }, + "locations": { + "type": "array", + "description": "The list of Google Compute Engine [locations](/compute/docs/zones#available) in which the cluster's nodes should be located.", + "items": { + "type": "string" + } + }, "selfLink": { "type": "string", "description": "[Output only] Server-defined URL for the resource." @@ -176,11 +205,11 @@ }, "endpoint": { "type": "string", - "description": "[Output only] The IP address of this cluster's Kubernetes 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." + "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." }, "initialClusterVersion": { "type": "string", - "description": "[Output only] The software version of Kubernetes master and kubelets used in the cluster when it was first created. The version can be upgraded over time." + "description": "[Output only] The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time." }, "currentMasterVersion": { "type": "string", @@ -188,7 +217,7 @@ }, "currentNodeVersion": { "type": "string", - "description": "[Output only] The current version of the node software components. If they are currently at different versions because they're in the process of being upgraded, this reflects the minimum version of any of them." + "description": "[Output only] 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." }, "createTime": { "type": "string", @@ -212,12 +241,12 @@ }, "nodeIpv4CidrSize": { "type": "integer", - "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.", + "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.", "format": "int32" }, "servicesIpv4Cidr": { "type": "string", - "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." + "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." }, "instanceGroupUrls": { "type": "array", @@ -225,13 +254,18 @@ "items": { "type": "string" } + }, + "currentNodeCount": { + "type": "integer", + "description": "[Output only] The number of nodes currently in the cluster.", + "format": "int32" } } }, "NodeConfig": { "id": "NodeConfig", "type": "object", - "description": "Per-node parameters.", + "description": "Parameters that describe the nodes in a cluster.", "properties": { "machineType": { "type": "string", @@ -244,10 +278,17 @@ }, "oauthScopes": { "type": "array", - "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*. If unspecified, no scopes are added.", + "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 [Google Container Registry](/container-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" } + }, + "metadata": { + "type": "object", + "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 four reserved keys: \"instance-template\", \"kube-env\", \"startup-script\", and \"user-data\" 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.", + "additionalProperties": { + "type": "string" + } } } }, @@ -258,23 +299,112 @@ "properties": { "username": { "type": "string", - "description": "The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint." + "description": "The username to use for HTTP basic authentication to the master endpoint." }, "password": { "type": "string", - "description": "The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint. Because the master endpoint is open to the internet, you should create a strong password." + "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." }, "clusterCaCertificate": { "type": "string", - "description": "[Output only] Base64 encoded public certificate that is the root of trust for the cluster." + "description": "[Output only] Base64-encoded public certificate that is the root of trust for the cluster." }, "clientCertificate": { "type": "string", - "description": "[Output only] Base64 encoded public certificate used by clients to authenticate to the cluster endpoint." + "description": "[Output only] Base64-encoded public certificate used by clients to authenticate to the cluster endpoint." }, "clientKey": { "type": "string", - "description": "[Output only] Base64 encoded private key used by clients to authenticate to the cluster endpoint." + "description": "[Output only] Base64-encoded private key used by clients to authenticate to the cluster endpoint." + } + } + }, + "AddonsConfig": { + "id": "AddonsConfig", + "type": "object", + "description": "Configuration for the addons that can be automatically spun up in the cluster, enabling additional functionality.", + "properties": { + "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." + }, + "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": { + "id": "HttpLoadBalancing", + "type": "object", + "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.", + "properties": { + "disabled": { + "type": "boolean", + "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." + } + } + }, + "HorizontalPodAutoscaling": { + "id": "HorizontalPodAutoscaling", + "type": "object", + "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.", + "properties": { + "disabled": { + "type": "boolean", + "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service." + } + } + }, + "NodePool": { + "id": "NodePool", + "type": "object", + "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.", + "properties": { + "name": { + "type": "string", + "description": "The name of the node pool." + }, + "config": { + "$ref": "NodeConfig", + "description": "The node configuration of the pool." + }, + "initialNodeCount": { + "type": "integer", + "description": "The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota.", + "format": "int32" + }, + "selfLink": { + "type": "string", + "description": "Server-defined URL for the resource." + }, + "version": { + "type": "string", + "description": "The version of the Kubernetes of this node." + }, + "instanceGroupUrls": { + "type": "array", + "description": "[Output only] The resource URLs of [instance groups](/compute/docs/instance-groups/) associated with this node pool.", + "items": { + "type": "string" + } + }, + "status": { + "type": "string", + "description": "The status of the nodes in this pool instance.", + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RUNNING_WITH_ERROR", + "RECONCILING", + "STOPPING", + "ERROR" + ] + }, + "statusMessage": { + "type": "string", + "description": "[Output only] Additional information about the current status of this node pool instance, if available." } } }, @@ -292,7 +422,7 @@ "Operation": { "id": "Operation", "type": "object", - "description": "Defines the operation resource. All fields are output only.", + "description": "This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.", "properties": { "name": { "type": "string", @@ -311,7 +441,10 @@ "DELETE_CLUSTER", "UPGRADE_MASTER", "UPGRADE_NODES", - "REPAIR_CLUSTER" + "REPAIR_CLUSTER", + "UPDATE_CLUSTER", + "CREATE_NODE_POOL", + "DELETE_NODE_POOL" ] }, "status": { @@ -324,6 +457,10 @@ "DONE" ] }, + "detail": { + "type": "string", + "description": "Detailed operation progress, if available." + }, "statusMessage": { "type": "string", "description": "If an error has occurred, a textual description of the error." @@ -341,7 +478,7 @@ "UpdateClusterRequest": { "id": "UpdateClusterRequest", "type": "object", - "description": "UpdateClusterRequest updates a cluster.", + "description": "UpdateClusterRequest updates the settings of a cluster.", "properties": { "update": { "$ref": "ClusterUpdate", @@ -352,11 +489,27 @@ "ClusterUpdate": { "id": "ClusterUpdate", "type": "object", - "description": "ClusterUpdate describes an update to the cluster.", + "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.", "properties": { "desiredNodeVersion": { "type": "string", - "description": "The Kubernetes version to change the nodes to (typically an upgrade). Use \"-\" to upgrade to the latest version supported by the server." + "description": "The Kubernetes version to change the nodes to (typically an upgrade). Use `-` to upgrade to the latest version supported by the server." + }, + "desiredMonitoringService": { + "type": "string", + "description": "The monitoring service the cluster should use to write metrics. Currently available options: * \"monitoring.googleapis.com\" - the Google Cloud Monitoring service * \"none\" - no metrics will be exported from the cluster" + }, + "desiredAddonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "desiredNodePoolId": { + "type": "string", + "description": "The node pool to be upgraded. This field is mandatory if the \"desired_node_version\" or \"desired_image_family\" is specified and there is more than one node pool on the cluster." + }, + "desiredMasterVersion": { + "type": "string", + "description": "The Kubernetes version to change the master to. The only valid value is the latest supported version. Use \"-\" to have the server automatically select the latest version." } } }, @@ -371,17 +524,24 @@ "items": { "$ref": "Operation" } + }, + "missingZones": { + "type": "array", + "description": "If any zones are listed here, the list of operations returned may be missing the operations from those zones.", + "items": { + "type": "string" + } } } }, "ServerConfig": { "id": "ServerConfig", "type": "object", - "description": "Container Engine Server configuration.", + "description": "Container Engine service configuration.", "properties": { "defaultClusterVersion": { "type": "string", - "description": "What version this server deploys by default." + "description": "Version of Kubernetes the service deploys by default." }, "validNodeVersions": { "type": "array", @@ -389,6 +549,42 @@ "items": { "type": "string" } + }, + "defaultImageFamily": { + "type": "string", + "description": "Default image family." + }, + "validImageFamilies": { + "type": "array", + "description": "List of valid image families.", + "items": { + "type": "string" + } + } + } + }, + "ListNodePoolsResponse": { + "id": "ListNodePoolsResponse", + "type": "object", + "description": "ListNodePoolsResponse is the result of ListNodePoolsRequest.", + "properties": { + "nodePools": { + "type": "array", + "description": "A list of node pools for a cluster.", + "items": { + "$ref": "NodePool" + } + } + } + }, + "CreateNodePoolRequest": { + "id": "CreateNodePoolRequest", + "type": "object", + "description": "CreateNodePoolRequest creates a node pool for a cluster.", + "properties": { + "nodePool": { + "$ref": "NodePool", + "description": "The node pool to create." } } } @@ -406,13 +602,13 @@ "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, "zone": { "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or \"-\" for all zones.", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for.", "required": true, "location": "path" } @@ -440,7 +636,7 @@ "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, @@ -466,11 +662,11 @@ "id": "container.projects.zones.clusters.get", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "httpMethod": "GET", - "description": "Gets a specific cluster.", + "description": "Gets the details of a specific cluster.", "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, @@ -503,11 +699,11 @@ "id": "container.projects.zones.clusters.create", "path": "v1/projects/{projectId}/zones/{zone}/clusters", "httpMethod": "POST", - "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master endpoint. By default, the cluster is created in the project's [default network](/compute/docs/networking#networks_1). One firewall is added for the cluster. After cluster creation, the cluster 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 is being used by the cluster.", + "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](/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the cluster 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 is being used by the cluster.", "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, @@ -536,11 +732,11 @@ "id": "container.projects.zones.clusters.update", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "httpMethod": "PUT", - "description": "Update settings of a specific cluster.", + "description": "Updates the settings of a specific cluster.", "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, @@ -576,11 +772,11 @@ "id": "container.projects.zones.clusters.delete", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "httpMethod": "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.", + "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 (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time.", "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, @@ -609,6 +805,177 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "nodePools": { + "methods": { + "list": { + "id": "container.projects.zones.clusters.nodePools.list", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "httpMethod": "GET", + "description": "Lists the node pools for a cluster.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + "required": true, + "location": "path" + }, + "clusterId": { + "type": "string", + "description": "The name of the cluster.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "ListNodePoolsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "id": "container.projects.zones.clusters.nodePools.get", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "httpMethod": "GET", + "description": "Retrieves the node pool requested.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + "required": true, + "location": "path" + }, + "clusterId": { + "type": "string", + "description": "The name of the cluster.", + "required": true, + "location": "path" + }, + "nodePoolId": { + "type": "string", + "description": "The name of the node pool.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "NodePool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "id": "container.projects.zones.clusters.nodePools.create", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "httpMethod": "POST", + "description": "Creates a node pool for a cluster.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + "required": true, + "location": "path" + }, + "clusterId": { + "type": "string", + "description": "The name of the cluster.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "request": { + "$ref": "CreateNodePoolRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "id": "container.projects.zones.clusters.nodePools.delete", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "httpMethod": "DELETE", + "description": "Deletes a node pool from a cluster.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "required": true, + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + "required": true, + "location": "path" + }, + "clusterId": { + "type": "string", + "description": "The name of the cluster.", + "required": true, + "location": "path" + }, + "nodePoolId": { + "type": "string", + "description": "The name of the node pool to delete.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } }, "operations": { @@ -621,13 +988,13 @@ "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, "zone": { "type": "string", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or \"-\" for all zones.", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones.", "required": true, "location": "path" } @@ -651,7 +1018,7 @@ "parameters": { "projectId": { "type": "string", - "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", "required": true, "location": "path" }, diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go index 1887943f6c4..5028d2233b1 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -104,11 +104,23 @@ type ProjectsZonesService struct { 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 { @@ -120,8 +132,42 @@ type ProjectsZonesOperationsService struct { s *Service } +// AddonsConfig: Configuration for the addons that can be automatically +// spun up in the cluster, enabling additional functionality. +type AddonsConfig struct { + // 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"` + + // ForceSendFields is a list of field names (e.g. + // "HorizontalPodAutoscaling") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *AddonsConfig) MarshalJSON() ([]byte, error) { + type noMethod AddonsConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + // Cluster: A Google Container Engine cluster. type Cluster struct { + // AddonsConfig: Configurations for the various addons available to run + // in the cluster. + AddonsConfig *AddonsConfig `json:"addonsConfig,omitempty"` + // ClusterIpv4Cidr: The IP address range of the container pods in this // cluster, in // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) @@ -137,51 +183,65 @@ type Cluster struct { // the master endpoint. CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` + // CurrentNodeCount: [Output only] The number of nodes currently in the + // cluster. + CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` + // CurrentNodeVersion: [Output only] The current version of the node - // software components. If they are currently at different versions + // software components. If they are currently at multiple versions // because they're in the process of being upgraded, this reflects the - // minimum version of any of them. + // minimum version of all nodes. CurrentNodeVersion string `json:"currentNodeVersion,omitempty"` // Description: An optional description of this cluster. Description string `json:"description,omitempty"` - // Endpoint: [Output only] The IP address of this cluster's Kubernetes - // master endpoint. The endpoint can be accessed from the internet at + // 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"` - // InitialClusterVersion: [Output only] The software version of - // Kubernetes master and kubelets used in the cluster when it was first + // InitialClusterVersion: [Output only] The software version of the + // master endpoint and kubelets used in the cluster when it was first // created. The version can be upgraded over time. InitialClusterVersion string `json:"initialClusterVersion,omitempty"` // InitialNodeCount: The number of nodes to create in this cluster. You - // must ensure that your Compute Engine [resource - // quota](/compute/docs/resource-quotas) is sufficient for this number - // of instances. You must also have available firewall and routes quota. + // must ensure that your Compute Engine resource quota 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. InitialNodeCount int64 `json:"initialNodeCount,omitempty"` // InstanceGroupUrls: [Output only] The resource URLs of [instance // groups](/compute/docs/instance-groups/) associated with this cluster. InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` - // LoggingService: The logging service that the cluster should write - // logs to. Currently available options: * "logging.googleapis.com" - - // the Google Cloud Logging service * "none" - no logs will be exported - // from the cluster * "" - default value; the default is - // "logging.googleapis.com" + // Locations: The list of Google Compute Engine + // [locations](/compute/docs/zones#available) in which the cluster's + // nodes should be located. + Locations []string `json:"locations,omitempty"` + + // LoggingService: The logging service the cluster should use to write + // logs. Currently available options: * `logging.googleapis.com` - the + // Google Cloud Logging service. * `none` - no logs will be exported + // from the cluster. * if left as an empty + // string,`logging.googleapis.com` will be used. LoggingService string `json:"loggingService,omitempty"` - // MasterAuth: The authentication information for accessing the master. + // MasterAuth: The authentication information for accessing the master + // endpoint. MasterAuth *MasterAuth `json:"masterAuth,omitempty"` - // MonitoringService: The monitoring service that the cluster should - // write metrics to. Currently available options: * - // "monitoring.googleapis.com" - the Google Cloud Monitoring service * - // "none" - no metrics will be exported from the cluster * "" - default - // value; the default is "monitoring.googleapis.com" + // MonitoringService: The monitoring service the cluster should use to + // write metrics. Currently available options: * + // `monitoring.googleapis.com` - the Google Cloud Monitoring service. * + // `none` - no metrics will be exported from the cluster. * if left as + // an empty string, `monitoring.googleapis.com` will be used. MonitoringService string `json:"monitoringService,omitempty"` // Name: The name of this cluster. The name must be unique within this @@ -191,21 +251,32 @@ type Cluster struct { Name string `json:"name,omitempty"` // Network: The name of the Google Compute Engine - // [network](/compute/docs/networking#networks_1) to which the cluster - // is connected. If left unspecified, the "default" network will be - // used. + // [network](/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"` - // NodeConfig: Parameters used in creating the cluster's nodes. See the - // descriptions of the child properties of `nodeConfig`. If unspecified, - // the defaults for all child properties are used. + // NodeConfig: Parameters used in creating the cluster's nodes. See + // `nodeConfig` for the description of its properties. 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. If + // unspecified, the defaults are used. 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. + // `container_ipv4_cidr` range. NodeIpv4CidrSize int64 `json:"nodeIpv4CidrSize,omitempty"` + // NodePools: The node pools associated with this cluster. When creating + // a new cluster, only a single node pool should be specified. This + // field should not be set if "node_config" or "initial_node_count" are + // specified. + NodePools []*NodePool `json:"nodePools,omitempty"` + // SelfLink: [Output only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -213,7 +284,7 @@ type Cluster struct { // 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. + // the last `/16` from the container CIDR. ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` // Status: [Output only] The current status of this cluster. @@ -231,6 +302,11 @@ type Cluster struct { // status of this cluster, if available. StatusMessage string `json:"statusMessage,omitempty"` + // Subnetwork: The name of the Google Compute Engine + // [subnetwork](/compute/docs/subnetworks) to which the cluster is + // connected. + Subnetwork string `json:"subnetwork,omitempty"` + // Zone: [Output only] The name of the Google Compute Engine // [zone](/compute/docs/zones#available) in which the cluster resides. Zone string `json:"zone,omitempty"` @@ -239,7 +315,7 @@ type Cluster struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClusterIpv4Cidr") to + // ForceSendFields is a list of field names (e.g. "AddonsConfig") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -255,13 +331,35 @@ func (s *Cluster) MarshalJSON() ([]byte, error) { } // 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 { + // DesiredAddonsConfig: Configurations for the various addons available + // to run in the cluster. + DesiredAddonsConfig *AddonsConfig `json:"desiredAddonsConfig,omitempty"` + + // DesiredMasterVersion: The Kubernetes version to change the master to. + // The only valid value is the latest supported version. Use "-" to have + // the server automatically select the latest version. + DesiredMasterVersion string `json:"desiredMasterVersion,omitempty"` + + // DesiredMonitoringService: The monitoring service the cluster should + // use to write metrics. Currently available options: * + // "monitoring.googleapis.com" - the Google Cloud Monitoring service * + // "none" - no metrics will be exported from the cluster + DesiredMonitoringService string `json:"desiredMonitoringService,omitempty"` + + // DesiredNodePoolId: The node pool to be upgraded. This field is + // mandatory if the "desired_node_version" or "desired_image_family" is + // specified and there is more than one node pool on the cluster. + DesiredNodePoolId string `json:"desiredNodePoolId,omitempty"` + // DesiredNodeVersion: The Kubernetes version to change the nodes to - // (typically an upgrade). Use "-" to upgrade to the latest version + // (typically an upgrade). Use `-` to upgrade to the latest version // supported by the server. DesiredNodeVersion string `json:"desiredNodeVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "DesiredNodeVersion") + // ForceSendFields is a list of field names (e.g. "DesiredAddonsConfig") // to unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -297,6 +395,77 @@ func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +// CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for +// a cluster. +type CreateNodePoolRequest struct { + // NodePool: The node pool to create. + NodePool *NodePool `json:"nodePool,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NodePool") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { + type noMethod CreateNodePoolRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +// 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 a Heapster pod is + // running in the cluster, which is also used by the Cloud Monitoring + // service. + 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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { + type noMethod HorizontalPodAutoscaling + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +// 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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { + type noMethod HttpLoadBalancing + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + // ListClustersResponse: ListClustersResponse is the result of // ListClustersRequest. type ListClustersResponse struct { @@ -304,6 +473,10 @@ type ListClustersResponse struct { // 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:"-"` @@ -323,9 +496,38 @@ func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } +// 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 values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListNodePoolsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + // 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"` @@ -334,7 +536,7 @@ type ListOperationsResponse struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Operations") to + // ForceSendFields is a list of field names (e.g. "MissingZones") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -353,25 +555,25 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { // endpoint. Authentication can be done using HTTP basic auth or using // client certificates. type MasterAuth struct { - // ClientCertificate: [Output only] Base64 encoded public certificate + // ClientCertificate: [Output only] Base64-encoded public certificate // used by clients to authenticate to the cluster endpoint. ClientCertificate string `json:"clientCertificate,omitempty"` - // ClientKey: [Output only] Base64 encoded private key used by clients + // 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 + // 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 when - // accessing the Kubernetes master endpoint. Because the master endpoint - // is open to the internet, you should create a strong password. + // 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. Password string `json:"password,omitempty"` - // Username: The username to use for HTTP basic authentication when - // accessing the Kubernetes master endpoint. + // Username: The username to use for HTTP basic authentication to the + // master endpoint. Username string `json:"username,omitempty"` // ForceSendFields is a list of field names (e.g. "ClientCertificate") @@ -389,7 +591,7 @@ func (s *MasterAuth) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// NodeConfig: Per-node parameters. +// NodeConfig: Parameters that describe the nodes in a cluster. type NodeConfig struct { // DiskSizeGb: Size of the disk attached to each node, specified in GB. // The smallest allowed disk size is 10GB. If unspecified, the default @@ -401,13 +603,29 @@ type NodeConfig struct { // unspecified, the default machine type is `n1-standard-1`. MachineType string `json:"machineType,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 four reserved keys: "instance-template", "kube-env", + // "startup-script", and "user-data" 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"` + // 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*. If unspecified, no scopes are added. + // for communicating with **gcr.io** (the [Google Container + // Registry](/container-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"` // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to @@ -425,9 +643,78 @@ func (s *NodeConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// Operation: Defines the operation resource. All fields are output +// 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 { + // Config: The node configuration of the pool. + Config *NodeConfig `json:"config,omitempty"` + + // InitialNodeCount: The initial node count for the pool. You must + // ensure that your Compute Engine resource quota 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 [instance + // groups](/compute/docs/instance-groups/) associated with this node + // pool. + InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` + + // Name: The name of the node pool. + Name string `json:"name,omitempty"` + + // SelfLink: Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // Status: The status of the nodes in this pool instance. + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "PROVISIONING" + // "RUNNING" + // "RUNNING_WITH_ERROR" + // "RECONCILING" + // "STOPPING" + // "ERROR" + Status string `json:"status,omitempty"` + + // StatusMessage: [Output only] Additional information about the current + // status of this node pool instance, if available. + StatusMessage string `json:"statusMessage,omitempty"` + + // Version: The version of the Kubernetes of this node. + 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. "Config") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` +} + +func (s *NodePool) MarshalJSON() ([]byte, error) { + type noMethod NodePool + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields) +} + +// Operation: This operation resource represents operations that may +// have happened or are happening on the cluster. All fields are output // only. type Operation struct { + // Detail: Detailed operation progress, if available. + Detail string `json:"detail,omitempty"` + // Name: The server-assigned ID for the operation. Name string `json:"name,omitempty"` @@ -440,6 +727,9 @@ type Operation struct { // "UPGRADE_MASTER" // "UPGRADE_NODES" // "REPAIR_CLUSTER" + // "UPDATE_CLUSTER" + // "CREATE_NODE_POOL" + // "DELETE_NODE_POOL" OperationType string `json:"operationType,omitempty"` // SelfLink: Server-defined URL for the resource. @@ -470,7 +760,7 @@ type Operation struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "Detail") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -485,11 +775,18 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// ServerConfig: Container Engine Server configuration. +// ServerConfig: Container Engine service configuration. type ServerConfig struct { - // DefaultClusterVersion: What version this server deploys by default. + // DefaultClusterVersion: Version of Kubernetes the service deploys by + // default. DefaultClusterVersion string `json:"defaultClusterVersion,omitempty"` + // DefaultImageFamily: Default image family. + DefaultImageFamily string `json:"defaultImageFamily,omitempty"` + + // ValidImageFamilies: List of valid image families. + ValidImageFamilies []string `json:"validImageFamilies,omitempty"` + // ValidNodeVersions: List of valid node upgrade target versions. ValidNodeVersions []string `json:"validNodeVersions,omitempty"` @@ -513,7 +810,8 @@ func (s *ServerConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields) } -// UpdateClusterRequest: UpdateClusterRequest updates a cluster. +// UpdateClusterRequest: UpdateClusterRequest updates the settings of a +// cluster. type UpdateClusterRequest struct { // Update: A description of the update. Update *ClusterUpdate `json:"update,omitempty"` @@ -553,14 +851,6 @@ func (r *ProjectsZonesService) GetServerconfig(projectId string, zone string) *P return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesGetServerconfigCall) QuotaUser(quotaUser string) *ProjectsZonesGetServerconfigCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -614,7 +904,8 @@ func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response // 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() (*ServerConfig, error) { +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 { @@ -652,13 +943,13 @@ func (c *ProjectsZonesGetServerconfigCall) Do() (*ServerConfig, error) { // ], // "parameters": { // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or \"-\" for all zones.", + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for.", // "location": "path", // "required": true, // "type": "string" @@ -687,9 +978,9 @@ type ProjectsZonesClustersCreateCall struct { } // Create: Creates a cluster, consisting of the specified number and -// type of Google Compute Engine instances, plus a Kubernetes master -// endpoint. By default, the cluster is created in the project's -// [default network](/compute/docs/networking#networks_1). One firewall +// type of Google Compute Engine instances. By default, the cluster is +// created in the project's [default +// network](/compute/docs/networks-and-firewalls#networks). One firewall // is added for the cluster. After cluster creation, the cluster creates // routes for each node to allow the containers on that node to // communicate with all other instances in the cluster. Finally, an @@ -703,14 +994,6 @@ func (r *ProjectsZonesClustersService) Create(projectId string, zone string, cre return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesClustersCreateCall) QuotaUser(quotaUser string) *ProjectsZonesClustersCreateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -757,7 +1040,8 @@ func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -786,7 +1070,7 @@ func (c *ProjectsZonesClustersCreateCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master endpoint. By default, the cluster is created in the project's [default network](/compute/docs/networking#networks_1). One firewall is added for the cluster. After cluster creation, the cluster 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 is being used by the cluster.", + // "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](/compute/docs/networks-and-firewalls#networks). One firewall is added for the cluster. After cluster creation, the cluster 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 is being used by the cluster.", // "httpMethod": "POST", // "id": "container.projects.zones.clusters.create", // "parameterOrder": [ @@ -795,7 +1079,7 @@ func (c *ProjectsZonesClustersCreateCall) Do() (*Operation, error) { // ], // "parameters": { // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" @@ -834,7 +1118,10 @@ type ProjectsZonesClustersDeleteCall struct { // Delete: Deletes the cluster, including the Kubernetes endpoint and // all worker nodes. Firewalls and routes that were configured during -// cluster creation are also deleted. +// cluster creation are also deleted. Other Google Compute Engine +// resources that might be in use by the cluster (e.g. load balancer +// resources) will not be deleted if they weren't present at the initial +// create time. func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clusterId string) *ProjectsZonesClustersDeleteCall { c := &ProjectsZonesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -843,14 +1130,6 @@ func (r *ProjectsZonesClustersService) Delete(projectId string, zone string, clu return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesClustersDeleteCall) QuotaUser(quotaUser string) *ProjectsZonesClustersDeleteCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -892,7 +1171,8 @@ func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -921,7 +1201,7 @@ func (c *ProjectsZonesClustersDeleteCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted.", + // "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 (e.g. load balancer resources) will not be deleted if they weren't present at the initial create time.", // "httpMethod": "DELETE", // "id": "container.projects.zones.clusters.delete", // "parameterOrder": [ @@ -937,7 +1217,7 @@ func (c *ProjectsZonesClustersDeleteCall) Do() (*Operation, error) { // "type": "string" // }, // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" @@ -972,7 +1252,7 @@ type ProjectsZonesClustersGetCall struct { ctx_ context.Context } -// Get: Gets a specific cluster. +// Get: Gets the details of a specific cluster. func (r *ProjectsZonesClustersService) Get(projectId string, zone string, clusterId string) *ProjectsZonesClustersGetCall { c := &ProjectsZonesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -981,14 +1261,6 @@ func (r *ProjectsZonesClustersService) Get(projectId string, zone string, cluste return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesClustersGetCall) QuotaUser(quotaUser string) *ProjectsZonesClustersGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1043,7 +1315,8 @@ func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, er // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsZonesClustersGetCall) Do() (*Cluster, error) { +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 { @@ -1072,7 +1345,7 @@ func (c *ProjectsZonesClustersGetCall) Do() (*Cluster, error) { } return ret, nil // { - // "description": "Gets a specific cluster.", + // "description": "Gets the details of a specific cluster.", // "httpMethod": "GET", // "id": "container.projects.zones.clusters.get", // "parameterOrder": [ @@ -1088,7 +1361,7 @@ func (c *ProjectsZonesClustersGetCall) Do() (*Cluster, error) { // "type": "string" // }, // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" @@ -1131,14 +1404,6 @@ func (r *ProjectsZonesClustersService) List(projectId string, zone string) *Proj return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesClustersListCall) QuotaUser(quotaUser string) *ProjectsZonesClustersListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1192,7 +1457,8 @@ func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, e // returned 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() (*ListClustersResponse, error) { +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 { @@ -1230,7 +1496,7 @@ func (c *ProjectsZonesClustersListCall) Do() (*ListClustersResponse, error) { // ], // "parameters": { // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" @@ -1265,7 +1531,7 @@ type ProjectsZonesClustersUpdateCall struct { ctx_ context.Context } -// Update: Update settings of a specific cluster. +// Update: Updates the settings of a specific cluster. 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 @@ -1275,14 +1541,6 @@ func (r *ProjectsZonesClustersService) Update(projectId string, zone string, clu return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesClustersUpdateCall) QuotaUser(quotaUser string) *ProjectsZonesClustersUpdateCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1330,7 +1588,8 @@ func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -1359,7 +1618,7 @@ func (c *ProjectsZonesClustersUpdateCall) Do() (*Operation, error) { } return ret, nil // { - // "description": "Update settings of a specific cluster.", + // "description": "Updates the settings of a specific cluster.", // "httpMethod": "PUT", // "id": "container.projects.zones.clusters.update", // "parameterOrder": [ @@ -1375,7 +1634,7 @@ func (c *ProjectsZonesClustersUpdateCall) Do() (*Operation, error) { // "type": "string" // }, // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" @@ -1401,6 +1660,585 @@ func (c *ProjectsZonesClustersUpdateCall) Do() (*Operation, error) { } +// method id "container.projects.zones.clusters.nodePools.create": + +type ProjectsZonesClustersNodePoolsCreateCall struct { + s *Service + projectId string + zone string + clusterId string + createnodepoolrequest *CreateNodePoolRequest + urlParams_ gensupport.URLParams + ctx_ context.Context +} + +// Create: Creates a node pool for a cluster. +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 information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsCreateCall { + c.ctx_ = ctx + return c +} + +func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) + if err != nil { + return nil, err + } + ctype := "application/json" + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a node pool for a cluster.", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.nodePools.create", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + // "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" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.delete": + +type ProjectsZonesClustersNodePoolsDeleteCall struct { + s *Service + projectId string + zone string + clusterId string + nodePoolId string + urlParams_ gensupport.URLParams + ctx_ context.Context +} + +// Delete: Deletes a node pool from a cluster. +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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsDeleteCall { + c.ctx_ = ctx + return c +} + +func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + "nodePoolId": c.nodePoolId, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a node pool from a cluster.", + // "httpMethod": "DELETE", + // "id": "container.projects.zones.clusters.nodePools.delete", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId", + // "nodePoolId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + // "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" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.get": + +type ProjectsZonesClustersNodePoolsGetCall struct { + s *Service + projectId string + zone string + clusterId string + nodePoolId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context +} + +// Get: Retrieves the node pool requested. +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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersNodePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsZonesClustersNodePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsGetCall { + c.ctx_ = ctx + return c +} + +func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + "nodePoolId": c.nodePoolId, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + req.Header.Set("If-None-Match", c.ifNoneMatch_) + } + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.get" call. +// Exactly one of *NodePool or error will be non-nil. 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &NodePool{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the node pool requested.", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.nodePools.get", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId", + // "nodePoolId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "nodePoolId": { + // "description": "The name of the node pool.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + // "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" + // ] + // } + +} + +// method id "container.projects.zones.clusters.nodePools.list": + +type ProjectsZonesClustersNodePoolsListCall struct { + s *Service + projectId string + zone string + clusterId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context +} + +// List: Lists the node pools for a cluster. +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 +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersNodePoolsListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersNodePoolsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsZonesClustersNodePoolsListCall) IfNoneMatch(entityTag string) *ProjectsZonesClustersNodePoolsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *ProjectsZonesClustersNodePoolsListCall { + c.ctx_ = ctx + return c +} + +func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zone": c.zone, + "clusterId": c.clusterId, + }) + req.Header.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + req.Header.Set("If-None-Match", c.ifNoneMatch_) + } + if c.ctx_ != nil { + return ctxhttp.Do(c.ctx_, c.s.client, req) + } + return c.s.client.Do(req) +} + +// Do executes the "container.projects.zones.clusters.nodePools.list" call. +// Exactly one of *ListNodePoolsResponse or error will be non-nil. 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListNodePoolsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the node pools for a cluster.", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.nodePools.list", + // "parameterOrder": [ + // "projectId", + // "zone", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides.", + // "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" + // ] + // } + +} + // method id "container.projects.zones.operations.get": type ProjectsZonesOperationsGetCall struct { @@ -1422,14 +2260,6 @@ func (r *ProjectsZonesOperationsService) Get(projectId string, zone string, oper return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesOperationsGetCall) QuotaUser(quotaUser string) *ProjectsZonesOperationsGetCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1484,7 +2314,8 @@ func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, // 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() (*Operation, error) { +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 { @@ -1529,7 +2360,7 @@ func (c *ProjectsZonesOperationsGetCall) Do() (*Operation, error) { // "type": "string" // }, // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" @@ -1572,14 +2403,6 @@ func (r *ProjectsZonesOperationsService) List(projectId string, zone string) *Pr return c } -// QuotaUser sets the optional parameter "quotaUser": 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. -func (c *ProjectsZonesOperationsListCall) QuotaUser(quotaUser string) *ProjectsZonesOperationsListCall { - c.urlParams_.Set("quotaUser", quotaUser) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1633,7 +2456,8 @@ func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, // returned 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() (*ListOperationsResponse, error) { +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 { @@ -1671,13 +2495,13 @@ func (c *ProjectsZonesOperationsListCall) Do() (*ListOperationsResponse, error) // ], // "parameters": { // "projectId": { - // "description": "The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber).", + // "description": "The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840).", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { - // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or \"-\" for all zones.", + // "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones.", // "location": "path", // "required": true, // "type": "string" diff --git a/vendor/google.golang.org/api/gensupport/backoff.go b/vendor/google.golang.org/api/gensupport/backoff.go new file mode 100644 index 00000000000..1356140472a --- /dev/null +++ b/vendor/google.golang.org/api/gensupport/backoff.go @@ -0,0 +1,46 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gensupport + +import ( + "math/rand" + "time" +) + +type BackoffStrategy interface { + // Pause returns the duration of the next pause and true if the operation should be + // retried, or false if no further retries should be attempted. + Pause() (time.Duration, bool) + + // Reset restores the strategy to its initial state. + Reset() +} + +// ExponentialBackoff performs exponential backoff as per https://en.wikipedia.org/wiki/Exponential_backoff. +// The initial pause time is given by Base. +// Once the total pause time exceeds Max, Pause will indicate no further retries. +type ExponentialBackoff struct { + Base time.Duration + Max time.Duration + total time.Duration + n uint +} + +func (eb *ExponentialBackoff) Pause() (time.Duration, bool) { + if eb.total > eb.Max { + return 0, false + } + + // The next pause is selected from randomly from [0, 2^n * Base). + d := time.Duration(rand.Int63n((1 << eb.n) * int64(eb.Base))) + eb.total += d + eb.n++ + return d, true +} + +func (eb *ExponentialBackoff) Reset() { + eb.n = 0 + eb.total = 0 +} diff --git a/vendor/google.golang.org/api/gensupport/buffer.go b/vendor/google.golang.org/api/gensupport/buffer.go new file mode 100644 index 00000000000..99210491153 --- /dev/null +++ b/vendor/google.golang.org/api/gensupport/buffer.go @@ -0,0 +1,77 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gensupport + +import ( + "bytes" + "io" + + "google.golang.org/api/googleapi" +) + +// MediaBuffer buffers data from an io.Reader to support uploading media in retryable chunks. +type MediaBuffer struct { + media io.Reader + + chunk []byte // The current chunk which is pending upload. The capacity is the chunk size. + err error // Any error generated when populating chunk by reading media. + + // The absolute position of chunk in the underlying media. + off int64 +} + +func NewMediaBuffer(media io.Reader, chunkSize int) *MediaBuffer { + return &MediaBuffer{media: media, chunk: make([]byte, 0, chunkSize)} +} + +// Chunk returns the current buffered chunk, the offset in the underlying media +// from which the chunk is drawn, and the size of the chunk. +// Successive calls to Chunk return the same chunk between calls to Next. +func (mb *MediaBuffer) Chunk() (chunk io.Reader, off int64, size int, err error) { + // There may already be data in chunk if Next has not been called since the previous call to Chunk. + if mb.err == nil && len(mb.chunk) == 0 { + mb.err = mb.loadChunk() + } + return bytes.NewReader(mb.chunk), mb.off, len(mb.chunk), mb.err +} + +// loadChunk will read from media into chunk, up to the capacity of chunk. +func (mb *MediaBuffer) loadChunk() error { + bufSize := cap(mb.chunk) + mb.chunk = mb.chunk[:bufSize] + + read := 0 + var err error + for err == nil && read < bufSize { + var n int + n, err = mb.media.Read(mb.chunk[read:]) + read += n + } + mb.chunk = mb.chunk[:read] + return err +} + +// Next advances to the next chunk, which will be returned by the next call to Chunk. +// Calls to Next without a corresponding prior call to Chunk will have no effect. +func (mb *MediaBuffer) Next() { + mb.off += int64(len(mb.chunk)) + mb.chunk = mb.chunk[0:0] +} + +type readerTyper struct { + io.Reader + googleapi.ContentTyper +} + +// ReaderAtToReader adapts a ReaderAt to be used as a Reader. +// If ra implements googleapi.ContentTyper, then the returned reader +// will also implement googleapi.ContentTyper, delegating to ra. +func ReaderAtToReader(ra io.ReaderAt, size int64) io.Reader { + r := io.NewSectionReader(ra, 0, size) + if typer, ok := ra.(googleapi.ContentTyper); ok { + return readerTyper{r, typer} + } + return r +} diff --git a/vendor/google.golang.org/api/gensupport/media.go b/vendor/google.golang.org/api/gensupport/media.go index d1d448d32c8..c6410e89a97 100644 --- a/vendor/google.golang.org/api/gensupport/media.go +++ b/vendor/google.golang.org/api/gensupport/media.go @@ -5,7 +5,6 @@ package gensupport import ( - "errors" "fmt" "io" "io/ioutil" @@ -18,12 +17,12 @@ import ( const sniffBuffSize = 512 -func NewContentSniffer(r io.Reader) *ContentSniffer { - return &ContentSniffer{r: r} +func newContentSniffer(r io.Reader) *contentSniffer { + return &contentSniffer{r: r} } -// ContentSniffer wraps a Reader, and reports the content type determined by sniffing up to 512 bytes from the Reader. -type ContentSniffer struct { +// contentSniffer wraps a Reader, and reports the content type determined by sniffing up to 512 bytes from the Reader. +type contentSniffer struct { r io.Reader start []byte // buffer for the sniffed bytes. err error // set to any error encountered while reading bytes to be sniffed. @@ -32,133 +31,169 @@ type ContentSniffer struct { sniffed bool // set to true on first sniff. } -func (sct *ContentSniffer) Read(p []byte) (n int, err error) { +func (cs *contentSniffer) Read(p []byte) (n int, err error) { // Ensure that the content type is sniffed before any data is consumed from Reader. - _, _ = sct.ContentType() + _, _ = cs.ContentType() - if len(sct.start) > 0 { - n := copy(p, sct.start) - sct.start = sct.start[n:] + if len(cs.start) > 0 { + n := copy(p, cs.start) + cs.start = cs.start[n:] return n, nil } // We may have read some bytes into start while sniffing, even if the read ended in an error. // We should first return those bytes, then the error. - if sct.err != nil { - return 0, sct.err + if cs.err != nil { + return 0, cs.err } // Now we have handled all bytes that were buffered while sniffing. Now just delegate to the underlying reader. - return sct.r.Read(p) + return cs.r.Read(p) } // ContentType returns the sniffed content type, and whether the content type was succesfully sniffed. -func (sct *ContentSniffer) ContentType() (string, bool) { - if sct.sniffed { - return sct.ctype, sct.ctype != "" +func (cs *contentSniffer) ContentType() (string, bool) { + if cs.sniffed { + return cs.ctype, cs.ctype != "" } - sct.sniffed = true + cs.sniffed = true // If ReadAll hits EOF, it returns err==nil. - sct.start, sct.err = ioutil.ReadAll(io.LimitReader(sct.r, sniffBuffSize)) + cs.start, cs.err = ioutil.ReadAll(io.LimitReader(cs.r, sniffBuffSize)) // Don't try to detect the content type based on possibly incomplete data. - if sct.err != nil { + if cs.err != nil { return "", false } - sct.ctype = http.DetectContentType(sct.start) - return sct.ctype, true + cs.ctype = http.DetectContentType(cs.start) + return cs.ctype, true } -// IncludeMedia combines an existing HTTP body with media content to create a multipart/related HTTP body. -// -// bodyp is an in/out parameter. It should initially point to the -// reader of the application/json (or whatever) payload to send in the -// API request. It's updated to point to the multipart body reader. -// -// ctypep is an in/out parameter. It should initially point to the -// content type of the bodyp, usually "application/json". It's updated -// to the "multipart/related" content type, with random boundary. -// -// The return value is a function that can be used to close the bodyp Reader with an error. -func IncludeMedia(media io.Reader, bodyp *io.Reader, ctypep *string) func() { - var mediaType string - media, mediaType = getMediaType(media) +// DetermineContentType determines the content type of the supplied reader. +// If the content type is already known, it can be specified via ctype. +// Otherwise, the content of media will be sniffed to determine the content type. +// If media implements googleapi.ContentTyper (deprecated), this will be used +// instead of sniffing the content. +// After calling DetectContentType the caller must not perform further reads on +// media, but rather read from the Reader that is returned. +func DetermineContentType(media io.Reader, ctype string) (io.Reader, string) { + // Note: callers could avoid calling DetectContentType if ctype != "", + // but doing the check inside this function reduces the amount of + // generated code. + if ctype != "" { + return media, ctype + } - body, bodyType := *bodyp, *ctypep - - pr, pw := io.Pipe() - mpw := multipart.NewWriter(pw) - *bodyp = pr - *ctypep = "multipart/related; boundary=" + mpw.Boundary() - go func() { - w, err := mpw.CreatePart(typeHeader(bodyType)) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: body CreatePart failed: %v", err)) - return - } - _, err = io.Copy(w, body) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: body Copy failed: %v", err)) - return - } - - w, err = mpw.CreatePart(typeHeader(mediaType)) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: media CreatePart failed: %v", err)) - return - } - _, err = io.Copy(w, media) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: media Copy failed: %v", err)) - return - } - mpw.Close() - pw.Close() - }() - return func() { pw.CloseWithError(errAborted) } -} - -var errAborted = errors.New("googleapi: upload aborted") - -func getMediaType(media io.Reader) (io.Reader, string) { + // For backwards compatability, allow clients to set content + // type by providing a ContentTyper for media. if typer, ok := media.(googleapi.ContentTyper); ok { return media, typer.ContentType() } - sniffer := NewContentSniffer(media) - typ, ok := sniffer.ContentType() - if !ok { - // TODO(mcgreevy): Remove this default. It maintains the semantics of the existing code, - // but should not be relied on. - typ = "application/octet-stream" + sniffer := newContentSniffer(media) + if ctype, ok := sniffer.ContentType(); ok { + return sniffer, ctype } - return sniffer, typ + // If content type could not be sniffed, reads from sniffer will eventually fail with an error. + return sniffer, "" } -// DetectMediaType detects and returns the content type of the provided media. -// If the type can not be determined, "application/octet-stream" is returned. -func DetectMediaType(media io.ReaderAt) string { - if typer, ok := media.(googleapi.ContentTyper); ok { - return typer.ContentType() - } +type typeReader struct { + io.Reader + typ string +} - typ := "application/octet-stream" - buf := make([]byte, 1024) - n, err := media.ReadAt(buf, 0) - buf = buf[:n] - if err == nil || err == io.EOF { - typ = http.DetectContentType(buf) +// multipartReader combines the contents of multiple readers to creat a multipart/related HTTP body. +// Close must be called if reads from the multipartReader are abandoned before reaching EOF. +type multipartReader struct { + pr *io.PipeReader + pipeOpen bool + ctype string +} + +func newMultipartReader(parts []typeReader) *multipartReader { + mp := &multipartReader{pipeOpen: true} + var pw *io.PipeWriter + mp.pr, pw = io.Pipe() + mpw := multipart.NewWriter(pw) + mp.ctype = "multipart/related; boundary=" + mpw.Boundary() + go func() { + for _, part := range parts { + w, err := mpw.CreatePart(typeHeader(part.typ)) + if err != nil { + mpw.Close() + pw.CloseWithError(fmt.Errorf("googleapi: CreatePart failed: %v", err)) + return + } + _, err = io.Copy(w, part.Reader) + if err != nil { + mpw.Close() + pw.CloseWithError(fmt.Errorf("googleapi: Copy failed: %v", err)) + return + } + } + + mpw.Close() + pw.Close() + }() + return mp +} + +func (mp *multipartReader) Read(data []byte) (n int, err error) { + return mp.pr.Read(data) +} + +func (mp *multipartReader) Close() error { + if !mp.pipeOpen { + return nil } - return typ + mp.pipeOpen = false + return mp.pr.Close() +} + +// CombineBodyMedia combines a json body with media content to create a multipart/related HTTP body. +// It returns a ReadCloser containing the combined body, and the overall "multipart/related" content type, with random boundary. +// +// The caller must call Close on the returned ReadCloser if reads are abandoned before reaching EOF. +func CombineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType string) (io.ReadCloser, string) { + mp := newMultipartReader([]typeReader{ + {body, bodyContentType}, + {media, mediaContentType}, + }) + return mp, mp.ctype } func typeHeader(contentType string) textproto.MIMEHeader { h := make(textproto.MIMEHeader) - h.Set("Content-Type", contentType) + if contentType != "" { + h.Set("Content-Type", contentType) + } return h } + +// PrepareUpload determines whether the data in the supplied reader should be +// uploaded in a single request, or in sequential chunks. +// chunkSize is the size of the chunk that media should be split into. +// If chunkSize is non-zero and the contents of media do not fit in a single +// chunk (or there is an error reading media), then media will be returned as a +// MediaBuffer. Otherwise, media will be returned as a Reader. +// +// After PrepareUpload has been called, media should no longer be used: the +// media content should be accessed via one of the return values. +func PrepareUpload(media io.Reader, chunkSize int) (io.Reader, *MediaBuffer) { + if chunkSize == 0 { // do not chunk + return media, nil + } + + mb := NewMediaBuffer(media, chunkSize) + rdr, _, _, err := mb.Chunk() + + if err == io.EOF { // we can upload this in a single request + return rdr, nil + } + // err might be a non-EOF error. If it is, the next call to mb.Chunk will + // return the same error. Returning a MediaBuffer ensures that this error + // will be handled at some point. + + return nil, mb +} diff --git a/vendor/google.golang.org/api/gensupport/params.go b/vendor/google.golang.org/api/gensupport/params.go index dfad3f414d0..3b3c743967e 100644 --- a/vendor/google.golang.org/api/gensupport/params.go +++ b/vendor/google.golang.org/api/gensupport/params.go @@ -4,12 +4,25 @@ package gensupport -import "net/url" +import ( + "net/url" + + "google.golang.org/api/googleapi" +) // URLParams is a simplified replacement for url.Values // that safely builds up URL parameters for encoding. type URLParams map[string][]string +// Get returns the first value for the given key, or "". +func (u URLParams) Get(key string) string { + vs := u[key] + if len(vs) == 0 { + return "" + } + return vs[0] +} + // Set sets the key to value. // It replaces any existing values. func (u URLParams) Set(key, value string) { @@ -29,3 +42,9 @@ func (u URLParams) SetMulti(key string, values []string) { func (u URLParams) Encode() string { return url.Values(u).Encode() } + +func SetOptions(u URLParams, opts ...googleapi.CallOption) { + for _, o := range opts { + u.Set(o.Get()) + } +} diff --git a/vendor/google.golang.org/api/gensupport/resumable.go b/vendor/google.golang.org/api/gensupport/resumable.go new file mode 100644 index 00000000000..ad169439eef --- /dev/null +++ b/vendor/google.golang.org/api/gensupport/resumable.go @@ -0,0 +1,198 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gensupport + +import ( + "fmt" + "io" + "net/http" + "sync" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/context/ctxhttp" +) + +const ( + // statusResumeIncomplete is the code returned by the Google uploader + // when the transfer is not yet complete. + statusResumeIncomplete = 308 + + // statusTooManyRequests is returned by the storage API if the + // per-project limits have been temporarily exceeded. The request + // should be retried. + // https://cloud.google.com/storage/docs/json_api/v1/status-codes#standardcodes + statusTooManyRequests = 429 +) + +// ResumableUpload is used by the generated APIs to provide resumable uploads. +// It is not used by developers directly. +type ResumableUpload struct { + Client *http.Client + // URI is the resumable resource destination provided by the server after specifying "&uploadType=resumable". + URI string + UserAgent string // User-Agent for header of the request + // Media is the object being uploaded. + Media *MediaBuffer + // MediaType defines the media type, e.g. "image/jpeg". + MediaType string + + mu sync.Mutex // guards progress + progress int64 // number of bytes uploaded so far + + // Callback is an optional function that will be periodically called with the cumulative number of bytes uploaded. + Callback func(int64) + + // If not specified, a default exponential backoff strategy will be used. + Backoff BackoffStrategy +} + +// Progress returns the number of bytes uploaded at this point. +func (rx *ResumableUpload) Progress() int64 { + rx.mu.Lock() + defer rx.mu.Unlock() + return rx.progress +} + +// doUploadRequest performs a single HTTP request to upload data. +// off specifies the offset in rx.Media from which data is drawn. +// size is the number of bytes in data. +// final specifies whether data is the final chunk to be uploaded. +func (rx *ResumableUpload) doUploadRequest(ctx context.Context, data io.Reader, off, size int64, final bool) (*http.Response, error) { + req, err := http.NewRequest("POST", rx.URI, data) + if err != nil { + return nil, err + } + + req.ContentLength = size + var contentRange string + if final { + if size == 0 { + contentRange = fmt.Sprintf("bytes */%v", off) + } else { + contentRange = fmt.Sprintf("bytes %v-%v/%v", off, off+size-1, off+size) + } + } else { + contentRange = fmt.Sprintf("bytes %v-%v/*", off, off+size-1) + } + req.Header.Set("Content-Range", contentRange) + req.Header.Set("Content-Type", rx.MediaType) + req.Header.Set("User-Agent", rx.UserAgent) + return ctxhttp.Do(ctx, rx.Client, req) + +} + +// reportProgress calls a user-supplied callback to report upload progress. +// If old==updated, the callback is not called. +func (rx *ResumableUpload) reportProgress(old, updated int64) { + if updated-old == 0 { + return + } + rx.mu.Lock() + rx.progress = updated + rx.mu.Unlock() + if rx.Callback != nil { + rx.Callback(updated) + } +} + +// transferChunk performs a single HTTP request to upload a single chunk from rx.Media. +func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, error) { + chunk, off, size, err := rx.Media.Chunk() + + done := err == io.EOF + if !done && err != nil { + return nil, err + } + + res, err := rx.doUploadRequest(ctx, chunk, off, int64(size), done) + if err != nil { + return res, err + } + + if res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK { + rx.reportProgress(off, off+int64(size)) + } + + if res.StatusCode == statusResumeIncomplete { + rx.Media.Next() + } + return res, nil +} + +func contextDone(ctx context.Context) bool { + select { + case <-ctx.Done(): + return true + default: + return false + } +} + +// Upload starts the process of a resumable upload with a cancellable context. +// It retries using the provided back off strategy until cancelled or the +// strategy indicates to stop retrying. +// It is called from the auto-generated API code and is not visible to the user. +// rx is private to the auto-generated API code. +// Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. +func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) { + var pause time.Duration + backoff := rx.Backoff + if backoff == nil { + backoff = DefaultBackoffStrategy() + } + + for { + // Ensure that we return in the case of cancelled context, even if pause is 0. + if contextDone(ctx) { + return nil, ctx.Err() + } + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-time.After(pause): + } + + resp, err = rx.transferChunk(ctx) + + var status int + if resp != nil { + status = resp.StatusCode + } + + // Check if we should retry the request. + if shouldRetry(status, err) { + var retry bool + pause, retry = backoff.Pause() + if retry { + if resp != nil && resp.Body != nil { + resp.Body.Close() + } + continue + } + } + + // If the chunk was uploaded successfully, but there's still + // more to go, upload the next chunk without any delay. + if status == statusResumeIncomplete { + pause = 0 + backoff.Reset() + resp.Body.Close() + continue + } + + // It's possible for err and resp to both be non-nil here, but we expose a simpler + // contract to our callers: exactly one of resp and err will be non-nil. This means + // that any response body must be closed here before returning a non-nil error. + if err != nil { + if resp != nil && resp.Body != nil { + resp.Body.Close() + } + return nil, err + } + + return resp, nil + } +} diff --git a/vendor/google.golang.org/api/gensupport/retry.go b/vendor/google.golang.org/api/gensupport/retry.go new file mode 100644 index 00000000000..7f83d1da99f --- /dev/null +++ b/vendor/google.golang.org/api/gensupport/retry.go @@ -0,0 +1,77 @@ +package gensupport + +import ( + "io" + "net" + "net/http" + "time" + + "golang.org/x/net/context" +) + +// Retry invokes the given function, retrying it multiple times if the connection failed or +// the HTTP status response indicates the request should be attempted again. ctx may be nil. +func Retry(ctx context.Context, f func() (*http.Response, error), backoff BackoffStrategy) (*http.Response, error) { + for { + resp, err := f() + + var status int + if resp != nil { + status = resp.StatusCode + } + + // Return if we shouldn't retry. + pause, retry := backoff.Pause() + if !shouldRetry(status, err) || !retry { + return resp, err + } + + // Ensure the response body is closed, if any. + if resp != nil && resp.Body != nil { + resp.Body.Close() + } + + // Pause, but still listen to ctx.Done if context is not nil. + var done <-chan struct{} + if ctx != nil { + done = ctx.Done() + } + select { + case <-done: + return nil, ctx.Err() + case <-time.After(pause): + } + } +} + +// DefaultBackoffStrategy returns a default strategy to use for retrying failed upload requests. +func DefaultBackoffStrategy() BackoffStrategy { + return &ExponentialBackoff{ + Base: 250 * time.Millisecond, + Max: 16 * time.Second, + } +} + +// shouldRetry returns true if the HTTP response / error indicates that the +// request should be attempted again. +func shouldRetry(status int, err error) bool { + // Retry for 5xx response codes. + if 500 <= status && status < 600 { + return true + } + + // Retry on statusTooManyRequests{ + if status == statusTooManyRequests { + return true + } + + // Retry on unexpected EOFs and temporary network errors. + if err == io.ErrUnexpectedEOF { + return true + } + if err, ok := err.(net.Error); ok { + return err.Temporary() + } + + return false +} diff --git a/vendor/google.golang.org/api/googleapi/googleapi.go b/vendor/google.golang.org/api/googleapi/googleapi.go index 35b4a7b6b36..858537e00b0 100644 --- a/vendor/google.golang.org/api/googleapi/googleapi.go +++ b/vendor/google.golang.org/api/googleapi/googleapi.go @@ -14,14 +14,8 @@ import ( "io/ioutil" "net/http" "net/url" - "regexp" - "strconv" "strings" - "sync" - "time" - "golang.org/x/net/context" - "golang.org/x/net/context/ctxhttp" "google.golang.org/api/googleapi/internal/uritemplates" ) @@ -53,14 +47,15 @@ type ServerResponse struct { const ( Version = "0.5" - // statusResumeIncomplete is the code returned by the Google uploader when the transfer is not yet complete. - statusResumeIncomplete = 308 - // UserAgent is the header string used to identify this package. UserAgent = "google-api-go-client/" + Version - // uploadPause determines the delay between failed upload attempts - uploadPause = 1 * time.Second + // The default chunk size to use for resumable uplods if not specified by the user. + DefaultUploadChunkSize = 8 * 1024 * 1024 + + // The minimum chunk size that can be used for resumable uploads. All + // user-specified chunk sizes must be multiple of this value. + MinUploadChunkSize = 256 * 1024 ) // Error contains an error response from the server. @@ -217,134 +212,60 @@ func (w countingWriter) Write(p []byte) (int, error) { // The remaining usable pieces of resumable uploads is exposed in each auto-generated API. type ProgressUpdater func(current, total int64) -// ResumableUpload is used by the generated APIs to provide resumable uploads. +type MediaOption interface { + setOptions(o *MediaOptions) +} + +type contentTypeOption string + +func (ct contentTypeOption) setOptions(o *MediaOptions) { + o.ContentType = string(ct) + if o.ContentType == "" { + o.ForceEmptyContentType = true + } +} + +// ContentType returns a MediaOption which sets the Content-Type header for media uploads. +// If ctype is empty, the Content-Type header will be omitted. +func ContentType(ctype string) MediaOption { + return contentTypeOption(ctype) +} + +type chunkSizeOption int + +func (cs chunkSizeOption) setOptions(o *MediaOptions) { + size := int(cs) + if size%MinUploadChunkSize != 0 { + size += MinUploadChunkSize - (size % MinUploadChunkSize) + } + o.ChunkSize = size +} + +// ChunkSize returns a MediaOption which sets the chunk size for media uploads. +// size will be rounded up to the nearest multiple of 256K. +// Media which contains fewer than size bytes will be uploaded in a single request. +// Media which contains size bytes or more will be uploaded in separate chunks. +// If size is zero, media will be uploaded in a single request. +func ChunkSize(size int) MediaOption { + return chunkSizeOption(size) +} + +// MediaOptions stores options for customizing media upload. It is not used by developers directly. +type MediaOptions struct { + ContentType string + ForceEmptyContentType bool + + ChunkSize int +} + +// ProcessMediaOptions stores options from opts in a MediaOptions. // It is not used by developers directly. -type ResumableUpload struct { - Client *http.Client - // URI is the resumable resource destination provided by the server after specifying "&uploadType=resumable". - URI string - UserAgent string // User-Agent for header of the request - // Media is the object being uploaded. - Media io.ReaderAt - // MediaType defines the media type, e.g. "image/jpeg". - MediaType string - // ContentLength is the full size of the object being uploaded. - ContentLength int64 - - mu sync.Mutex // guards progress - progress int64 // number of bytes uploaded so far - - // Callback is an optional function that will be periodically called with the cumulative number of bytes uploaded. - Callback func(int64) -} - -var ( - // rangeRE matches the transfer status response from the server. $1 is the last byte index uploaded. - rangeRE = regexp.MustCompile(`^bytes=0\-(\d+)$`) - // chunkSize is the size of the chunks created during a resumable upload and should be a power of two. - // 1<<18 is the minimum size supported by the Google uploader, and there is no maximum. - chunkSize int64 = 1 << 18 -) - -// Progress returns the number of bytes uploaded at this point. -func (rx *ResumableUpload) Progress() int64 { - rx.mu.Lock() - defer rx.mu.Unlock() - return rx.progress -} - -func (rx *ResumableUpload) transferStatus(ctx context.Context) (int64, *http.Response, error) { - req, _ := http.NewRequest("POST", rx.URI, nil) - req.ContentLength = 0 - req.Header.Set("User-Agent", rx.UserAgent) - req.Header.Set("Content-Range", fmt.Sprintf("bytes */%v", rx.ContentLength)) - res, err := ctxhttp.Do(ctx, rx.Client, req) - if err != nil || res.StatusCode != statusResumeIncomplete { - return 0, res, err +func ProcessMediaOptions(opts []MediaOption) *MediaOptions { + mo := &MediaOptions{ChunkSize: DefaultUploadChunkSize} + for _, o := range opts { + o.setOptions(mo) } - var start int64 - if m := rangeRE.FindStringSubmatch(res.Header.Get("Range")); len(m) == 2 { - start, err = strconv.ParseInt(m[1], 10, 64) - if err != nil { - return 0, nil, fmt.Errorf("unable to parse range size %v", m[1]) - } - start += 1 // Start at the next byte - } - return start, res, nil -} - -type chunk struct { - body io.Reader - size int64 - err error -} - -func (rx *ResumableUpload) transferChunks(ctx context.Context) (*http.Response, error) { - start, res, err := rx.transferStatus(ctx) - if err != nil || res.StatusCode != statusResumeIncomplete { - if err == context.Canceled { - return &http.Response{StatusCode: http.StatusRequestTimeout}, err - } - return res, err - } - - for { - select { // Check for cancellation - case <-ctx.Done(): - res.StatusCode = http.StatusRequestTimeout - return res, ctx.Err() - default: - } - reqSize := rx.ContentLength - start - if reqSize > chunkSize { - reqSize = chunkSize - } - r := io.NewSectionReader(rx.Media, start, reqSize) - req, _ := http.NewRequest("POST", rx.URI, r) - req.ContentLength = reqSize - req.Header.Set("Content-Range", fmt.Sprintf("bytes %v-%v/%v", start, start+reqSize-1, rx.ContentLength)) - req.Header.Set("Content-Type", rx.MediaType) - req.Header.Set("User-Agent", rx.UserAgent) - res, err = ctxhttp.Do(ctx, rx.Client, req) - start += reqSize - if err == nil && (res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK) { - rx.mu.Lock() - rx.progress = start // keep track of number of bytes sent so far - rx.mu.Unlock() - if rx.Callback != nil { - rx.Callback(start) - } - } - if err != nil || res.StatusCode != statusResumeIncomplete { - break - } - } - return res, err -} - -var sleep = time.Sleep // override in unit tests - -// Upload starts the process of a resumable upload with a cancellable context. -// It retries indefinitely (with a pause of uploadPause between attempts) until cancelled. -// It is called from the auto-generated API code and is not visible to the user. -// rx is private to the auto-generated API code. -func (rx *ResumableUpload) Upload(ctx context.Context) (*http.Response, error) { - var res *http.Response - var err error - for { - res, err = rx.transferChunks(ctx) - if err != nil || res.StatusCode == http.StatusCreated || res.StatusCode == http.StatusOK { - return res, err - } - select { // Check for cancellation - case <-ctx.Done(): - res.StatusCode = http.StatusRequestTimeout - return res, ctx.Err() - default: - } - sleep(uploadPause) - } - return res, err + return mo } func ResolveRelative(basestr, relstr string) string { @@ -471,3 +392,41 @@ func CombineFields(s []Field) string { } return strings.Join(r, ",") } + +// A CallOption is an optional argument to an API call. +// It should be treated as an opaque value by users of Google APIs. +// +// A CallOption is something that configures an API call in a way that is +// not specific to that API; for instance, controlling the quota user for +// an API call is common across many APIs, and is thus a CallOption. +type CallOption interface { + Get() (key, value string) +} + +// QuotaUser returns a CallOption that will set the quota user for a call. +// The quota user can be used by server-side applications to control accounting. +// It can be an arbitrary string up to 40 characters, and will override UserIP +// if both are provided. +func QuotaUser(u string) CallOption { return quotaUser(u) } + +type quotaUser string + +func (q quotaUser) Get() (string, string) { return "quotaUser", string(q) } + +// UserIP returns a CallOption that will set the "userIp" parameter of a call. +// This should be the IP address of the originating request. +func UserIP(ip string) CallOption { return userIP(ip) } + +type userIP string + +func (i userIP) Get() (string, string) { return "userIp", string(i) } + +// Trace returns a CallOption that enables diagnostic tracing for a call. +// traceToken is an ID supplied by Google support. +func Trace(traceToken string) CallOption { return traceTok(traceToken) } + +type traceTok string + +func (t traceTok) Get() (string, string) { return "trace", "token:" + string(t) } + +// TODO: Fields too diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go b/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go index 8a84813fe52..7c103ba1386 100644 --- a/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go +++ b/vendor/google.golang.org/api/googleapi/internal/uritemplates/uritemplates.go @@ -2,26 +2,15 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package uritemplates is a level 4 implementation of RFC 6570 (URI +// Package uritemplates is a level 3 implementation of RFC 6570 (URI // Template, http://tools.ietf.org/html/rfc6570). -// -// To use uritemplates, parse a template string and expand it with a value -// map: -// -// template, _ := uritemplates.Parse("https://api.github.com/repos{/user,repo}") -// values := make(map[string]interface{}) -// values["user"] = "jtacoma" -// values["repo"] = "uritemplates" -// expanded, _ := template.ExpandString(values) -// fmt.Printf(expanded) -// +// uritemplates does not support composite values (in Go: slices or maps) +// and so does not qualify as a level 4 implementation. package uritemplates import ( "bytes" "errors" - "fmt" - "reflect" "regexp" "strconv" "strings" @@ -45,52 +34,47 @@ func pctEncode(src []byte) []byte { return dst } -func escape(s string, allowReserved bool) (escaped string) { +func escape(s string, allowReserved bool) string { if allowReserved { - escaped = string(reserved.ReplaceAllFunc([]byte(s), pctEncode)) - } else { - escaped = string(unreserved.ReplaceAllFunc([]byte(s), pctEncode)) + return string(reserved.ReplaceAllFunc([]byte(s), pctEncode)) } - return escaped + return string(unreserved.ReplaceAllFunc([]byte(s), pctEncode)) } -// A UriTemplate is a parsed representation of a URI template. -type UriTemplate struct { +// A uriTemplate is a parsed representation of a URI template. +type uriTemplate struct { raw string parts []templatePart } -// Parse parses a URI template string into a UriTemplate object. -func Parse(rawtemplate string) (template *UriTemplate, err error) { - template = new(UriTemplate) - template.raw = rawtemplate - split := strings.Split(rawtemplate, "{") - template.parts = make([]templatePart, len(split)*2-1) +// parse parses a URI template string into a uriTemplate object. +func parse(rawTemplate string) (*uriTemplate, error) { + split := strings.Split(rawTemplate, "{") + parts := make([]templatePart, len(split)*2-1) for i, s := range split { if i == 0 { if strings.Contains(s, "}") { - err = errors.New("unexpected }") - break + return nil, errors.New("unexpected }") } - template.parts[i].raw = s - } else { - subsplit := strings.Split(s, "}") - if len(subsplit) != 2 { - err = errors.New("malformed template") - break - } - expression := subsplit[0] - template.parts[i*2-1], err = parseExpression(expression) - if err != nil { - break - } - template.parts[i*2].raw = subsplit[1] + parts[i].raw = s + continue } + subsplit := strings.Split(s, "}") + if len(subsplit) != 2 { + return nil, errors.New("malformed template") + } + expression := subsplit[0] + var err error + parts[i*2-1], err = parseExpression(expression) + if err != nil { + return nil, err + } + parts[i*2].raw = subsplit[1] } - if err != nil { - template = nil - } - return template, err + return &uriTemplate{ + raw: rawTemplate, + parts: parts, + }, nil } type templatePart struct { @@ -160,6 +144,8 @@ func parseExpression(expression string) (result templatePart, err error) { } func parseTerm(term string) (result templateTerm, err error) { + // TODO(djd): Remove "*" suffix parsing once we check that no APIs have + // mistakenly used that attribute. if strings.HasSuffix(term, "*") { result.explode = true term = term[:len(term)-1] @@ -185,175 +171,50 @@ func parseTerm(term string) (result templateTerm, err error) { } // Expand expands a URI template with a set of values to produce a string. -func (self *UriTemplate) Expand(value interface{}) (string, error) { - values, ismap := value.(map[string]interface{}) - if !ismap { - if m, ismap := struct2map(value); !ismap { - return "", errors.New("expected map[string]interface{}, struct, or pointer to struct.") - } else { - return self.Expand(m) - } - } +func (t *uriTemplate) Expand(values map[string]string) string { var buf bytes.Buffer - for _, p := range self.parts { - err := p.expand(&buf, values) - if err != nil { - return "", err - } + for _, p := range t.parts { + p.expand(&buf, values) } - return buf.String(), nil + return buf.String() } -func (self *templatePart) expand(buf *bytes.Buffer, values map[string]interface{}) error { - if len(self.raw) > 0 { - buf.WriteString(self.raw) - return nil +func (tp *templatePart) expand(buf *bytes.Buffer, values map[string]string) { + if len(tp.raw) > 0 { + buf.WriteString(tp.raw) + return } - var zeroLen = buf.Len() - buf.WriteString(self.first) - var firstLen = buf.Len() - for _, term := range self.terms { + var first = true + for _, term := range tp.terms { value, exists := values[term.name] if !exists { continue } - if buf.Len() != firstLen { - buf.WriteString(self.sep) - } - switch v := value.(type) { - case string: - self.expandString(buf, term, v) - case []interface{}: - self.expandArray(buf, term, v) - case map[string]interface{}: - if term.truncate > 0 { - return errors.New("cannot truncate a map expansion") - } - self.expandMap(buf, term, v) - default: - if m, ismap := struct2map(value); ismap { - if term.truncate > 0 { - return errors.New("cannot truncate a map expansion") - } - self.expandMap(buf, term, m) - } else { - str := fmt.Sprintf("%v", value) - self.expandString(buf, term, str) - } + if first { + buf.WriteString(tp.first) + first = false + } else { + buf.WriteString(tp.sep) } + tp.expandString(buf, term, value) } - if buf.Len() == firstLen { - original := buf.Bytes()[:zeroLen] - buf.Reset() - buf.Write(original) - } - return nil } -func (self *templatePart) expandName(buf *bytes.Buffer, name string, empty bool) { - if self.named { +func (tp *templatePart) expandName(buf *bytes.Buffer, name string, empty bool) { + if tp.named { buf.WriteString(name) if empty { - buf.WriteString(self.ifemp) + buf.WriteString(tp.ifemp) } else { buf.WriteString("=") } } } -func (self *templatePart) expandString(buf *bytes.Buffer, t templateTerm, s string) { +func (tp *templatePart) expandString(buf *bytes.Buffer, t templateTerm, s string) { if len(s) > t.truncate && t.truncate > 0 { s = s[:t.truncate] } - self.expandName(buf, t.name, len(s) == 0) - buf.WriteString(escape(s, self.allowReserved)) -} - -func (self *templatePart) expandArray(buf *bytes.Buffer, t templateTerm, a []interface{}) { - if len(a) == 0 { - return - } else if !t.explode { - self.expandName(buf, t.name, false) - } - for i, value := range a { - if t.explode && i > 0 { - buf.WriteString(self.sep) - } else if i > 0 { - buf.WriteString(",") - } - var s string - switch v := value.(type) { - case string: - s = v - default: - s = fmt.Sprintf("%v", v) - } - if len(s) > t.truncate && t.truncate > 0 { - s = s[:t.truncate] - } - if self.named && t.explode { - self.expandName(buf, t.name, len(s) == 0) - } - buf.WriteString(escape(s, self.allowReserved)) - } -} - -func (self *templatePart) expandMap(buf *bytes.Buffer, t templateTerm, m map[string]interface{}) { - if len(m) == 0 { - return - } - if !t.explode { - self.expandName(buf, t.name, len(m) == 0) - } - var firstLen = buf.Len() - for k, value := range m { - if firstLen != buf.Len() { - if t.explode { - buf.WriteString(self.sep) - } else { - buf.WriteString(",") - } - } - var s string - switch v := value.(type) { - case string: - s = v - default: - s = fmt.Sprintf("%v", v) - } - if t.explode { - buf.WriteString(escape(k, self.allowReserved)) - buf.WriteRune('=') - buf.WriteString(escape(s, self.allowReserved)) - } else { - buf.WriteString(escape(k, self.allowReserved)) - buf.WriteRune(',') - buf.WriteString(escape(s, self.allowReserved)) - } - } -} - -func struct2map(v interface{}) (map[string]interface{}, bool) { - value := reflect.ValueOf(v) - switch value.Type().Kind() { - case reflect.Ptr: - return struct2map(value.Elem().Interface()) - case reflect.Struct: - m := make(map[string]interface{}) - for i := 0; i < value.NumField(); i++ { - tag := value.Type().Field(i).Tag - var name string - if strings.Contains(string(tag), ":") { - name = tag.Get("uri") - } else { - name = strings.TrimSpace(string(tag)) - } - if len(name) == 0 { - name = value.Type().Field(i).Name - } - m[name] = value.Field(i).Interface() - } - return m, true - } - return nil, false + tp.expandName(buf, t.name, len(s) == 0) + buf.WriteString(escape(s, tp.allowReserved)) } diff --git a/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go b/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go index 399ef462369..eff260a6925 100644 --- a/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go +++ b/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go @@ -1,13 +1,13 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package uritemplates -func Expand(path string, expansions map[string]string) (string, error) { - template, err := Parse(path) +func Expand(path string, values map[string]string) (string, error) { + template, err := parse(path) if err != nil { return "", err } - values := make(map[string]interface{}) - for k, v := range expansions { - values[k] = v - } - return template.Expand(values) + return template.Expand(values), nil }