From c7376e5b39ace9d918b455f6ffa35332324d2680 Mon Sep 17 00:00:00 2001 From: Edward Muller Date: Mon, 22 Feb 2016 10:56:32 -0800 Subject: [PATCH] Update google.golang.org/api/... This release contains the Subnetwork stuff --- Godeps/Godeps.json | 18 +- .../api/compute/v1/compute-api.json | 645 +++- .../api/compute/v1/compute-gen.go | 2682 ++++++++++++++++- .../google.golang.org/api/dns/v1/dns-gen.go | 63 + .../api/gensupport/backoff.go | 34 + .../api/gensupport/params.go | 9 + .../api/gensupport/resumable.go | 163 +- .../api/pubsub/v1/pubsub-gen.go | 63 + .../api/sqladmin/v1beta4/sqladmin-gen.go | 63 + .../api/storage/v1/storage-api.json | 12 +- .../api/storage/v1/storage-gen.go | 42 + 11 files changed, 3477 insertions(+), 317 deletions(-) create mode 100644 vendor/google.golang.org/api/gensupport/backoff.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 30497a741..82b37eacf 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1171,39 +1171,39 @@ }, { "ImportPath": "google.golang.org/api/compute/v1", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/container/v1", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/dns/v1", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/gensupport", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/googleapi", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/googleapi/internal/uritemplates", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/pubsub/v1", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/sqladmin/v1beta4", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/api/storage/v1", - "Rev": "f6ba98773d96b877b246f3a9266493dfc11e276b" + "Rev": "61d74df3f9f3a66898c8e08aa7e702337b34dda3" }, { "ImportPath": "google.golang.org/appengine", 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 bc27bb7c6..8d5db8003 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/aU2RyGSEMbRxHCIqylkOho4GK2M\"", + "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/c55dTQvv4NWDkglZO3_PlmckRzg\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20160107", + "revision": "20160120", "title": "Compute Engine API", "description": "API for the Google Compute Engine service.", "ownerDomain": "google.com", @@ -746,12 +746,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 balancing mode, 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 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.", "format": "float" }, "maxUtilization": { @@ -764,7 +764,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,7 +810,7 @@ }, "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": { @@ -834,7 +834,7 @@ }, "timeoutSec": { "type": "integer", - "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", + "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].", "format": "int32" } } @@ -1431,7 +1431,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", @@ -1555,7 +1555,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." } } }, @@ -2128,7 +2128,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 +2139,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": { @@ -2162,7 +2162,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 +2177,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", @@ -2247,11 +2247,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." } } }, @@ -2312,6 +2312,10 @@ "description": "[Output Only] The total number of instances in the instance group.", "format": "int32" }, + "subnetwork": { + "type": "string", + "description": "[Output Only] 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." @@ -2490,7 +2494,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": { @@ -2929,11 +2933,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." } } }, @@ -3209,6 +3213,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", @@ -3464,7 +3478,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", @@ -3629,6 +3643,10 @@ "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 +3683,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" + } } } }, @@ -3696,6 +3721,10 @@ "networkIP": { "type": "string", "description": "[Output Only] An optional IPV4 internal network address assigned to the instance for this network interface." + }, + "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/zones/zone/subnetworks/subnetwork \n- zones/zone/subnetworks/subnetwork" } } }, @@ -3784,7 +3813,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": { @@ -3811,12 +3840,12 @@ }, "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] URL of the region where the operation resides. Only available when performing regional operations." }, "selfLink": { "type": "string", @@ -3925,7 +3954,7 @@ }, "zone": { "type": "string", - "description": "[Output Only] URL of the zone where the operation resides." + "description": "[Output Only] URL of the zone where the operation resides. Only available when performing per-zone operations." } } }, @@ -4074,7 +4103,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", @@ -4162,7 +4191,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." } } }, @@ -4200,6 +4229,7 @@ "SSD_TOTAL_GB", "SSL_CERTIFICATES", "STATIC_ADDRESSES", + "SUBNETWORKS", "TARGET_HTTPS_PROXIES", "TARGET_HTTP_PROXIES", "TARGET_INSTANCES", @@ -4235,6 +4265,7 @@ "", "", "", + "", "" ] }, @@ -4352,7 +4383,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": "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 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 Engien-operated gateway. Packets that do not match any Route in the sending instance's routing table are dropped.", "properties": { "creationTimestamp": { "type": "string", @@ -4402,11 +4433,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", @@ -4422,7 +4453,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": [ @@ -4525,7 +4556,7 @@ }, "items": { "type": "array", - "description": "A list of Route resources.", + "description": "[Output Only] A list of Route resources.", "items": { "$ref": "Route" } @@ -4588,7 +4619,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] Server defined URL for the resource." + "description": "[Output Only] Server-defined URL for the resource." } } }, @@ -4656,7 +4687,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", @@ -4710,7 +4741,7 @@ }, "items": { "type": "array", - "description": "A list of Snapshot resources.", + "description": "[Output Only] A list of Snapshot resources.", "items": { "$ref": "Snapshot" } @@ -4733,7 +4764,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", @@ -4803,6 +4834,194 @@ } } }, + "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": "[Output Only] 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": [ + "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", @@ -4938,7 +5157,7 @@ }, "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" } @@ -5878,7 +6097,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", @@ -5917,6 +6136,13 @@ "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.", @@ -5941,7 +6167,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", @@ -6243,7 +6469,7 @@ "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", @@ -6407,7 +6633,7 @@ "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 address resources contained within the specified region.", "parameters": { "filter": { "type": "string", @@ -6464,7 +6690,7 @@ "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", @@ -6628,7 +6854,7 @@ "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 autoscaler resources contained within the specified zone.", "parameters": { "filter": { "type": "string", @@ -6874,7 +7100,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", @@ -6947,7 +7173,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", @@ -6983,7 +7209,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", @@ -7023,7 +7249,7 @@ "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 type resources.", "parameters": { "filter": { "type": "string", @@ -7110,7 +7336,7 @@ "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 type resources available to the specified project.", "parameters": { "filter": { "type": "string", @@ -7167,7 +7393,7 @@ "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", @@ -7380,7 +7606,7 @@ "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", @@ -7653,7 +7879,7 @@ "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", @@ -7817,7 +8043,7 @@ "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", @@ -8013,7 +8239,7 @@ "id": "compute.globalAddresses.list", "path": "{project}/global/addresses", "httpMethod": "GET", - "description": "Retrieves the list of global address resources.", + "description": "Retrieves a list of global address resources.", "parameters": { "filter": { "type": "string", @@ -8157,7 +8383,7 @@ "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", @@ -8242,7 +8468,7 @@ "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", @@ -8351,7 +8577,7 @@ "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", @@ -9102,7 +9328,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", @@ -9527,7 +9753,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. Read Adding instances for more information.", "parameters": { "instanceGroup": { "type": "string", @@ -9614,7 +9840,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", @@ -9997,7 +10223,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", @@ -10634,6 +10860,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", @@ -10770,7 +11040,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", @@ -10811,7 +11081,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", @@ -10894,7 +11164,7 @@ "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 type resources.", "parameters": { "filter": { "type": "string", @@ -10981,7 +11251,7 @@ "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 type resources available to the specified project.", "parameters": { "filter": { "type": "string", @@ -11383,7 +11653,7 @@ }, "region": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "Name of the region scoping this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -11407,7 +11677,7 @@ "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", @@ -11945,6 +12215,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, 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.", + "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.", + "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.", + "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, 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.", + "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.", + "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": { @@ -12347,7 +12838,7 @@ "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", @@ -12511,7 +13002,7 @@ "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", @@ -12654,7 +13145,7 @@ "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", @@ -12782,7 +13273,7 @@ "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 given instance that is referenced by the given TargetPool.", "parameters": { "project": { "type": "string", @@ -12862,7 +13353,7 @@ "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 TargetPool resources available to the specified project and region.", "parameters": { "filter": { "type": "string", @@ -13055,7 +13546,7 @@ "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", @@ -13219,7 +13710,7 @@ "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 TargetVpnGateway resources available to the specified project and region.", "parameters": { "filter": { "type": "string", @@ -13416,7 +13907,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", @@ -13452,7 +13943,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", @@ -13488,7 +13979,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", @@ -13528,7 +14019,7 @@ "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", @@ -13692,7 +14183,7 @@ "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", @@ -13829,7 +14320,7 @@ "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", 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 c5882702e..9e9bde1bc 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 @@ -1370,15 +1382,15 @@ 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 balancing mode, 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 + // 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 float64 `json:"maxRatePerInstance,omitempty"` // MaxUtilization: Used when balancingMode is UTILIZATION. This ratio @@ -1402,8 +1414,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,8 +1456,8 @@ 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 @@ -1462,7 +1473,8 @@ type BackendService struct { SelfLink string `json:"selfLink,omitempty"` // TimeoutSec: How many seconds to wait for the backend before - // considering it a failed request. Default is 30 seconds. + // considering it a failed request. Default is 30 seconds. Valid range + // is [1, 86400]. TimeoutSec int64 `json:"timeoutSec,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2234,10 +2246,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 @@ -2434,6 +2445,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 @@ -3157,16 +3171,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 @@ -3201,13 +3215,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 +3233,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 @@ -3289,11 +3304,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 @@ -3364,6 +3383,10 @@ type InstanceGroup struct { // group. Size int64 `json:"size,omitempty"` + // Subnetwork: [Output Only] 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"` @@ -3573,7 +3596,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 @@ -4196,11 +4220,15 @@ type InstanceList struct { // 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 @@ -4571,6 +4599,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 @@ -4894,7 +4943,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 @@ -5121,6 +5176,15 @@ type Network struct { // 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 +5218,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:"-"` @@ -5205,6 +5273,18 @@ type NetworkInterface struct { // assigned to the instance for this network interface. 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/zones/zone/subnetworks/subnetwork + // - zones/zone/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, @@ -5291,8 +5371,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 @@ -5316,13 +5396,13 @@ type Operation struct { // 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. + // Only available when performing regional operations. Region string `json:"region,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -5361,7 +5441,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] 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 @@ -5695,9 +5776,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 @@ -5791,8 +5878,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 @@ -5843,6 +5930,7 @@ type Quota struct { // "SSD_TOTAL_GB" // "SSL_CERTIFICATES" // "STATIC_ADDRESSES" + // "SUBNETWORKS" // "TARGET_HTTPS_PROXIES" // "TARGET_HTTP_PROXIES" // "TARGET_INSTANCES" @@ -5995,7 +6083,7 @@ func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) { // 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 +// 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 @@ -6043,12 +6131,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/ @@ -6066,9 +6155,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 @@ -6182,7 +6273,7 @@ type RouteList struct { // 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. @@ -6264,7 +6355,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 @@ -6346,7 +6437,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 @@ -6404,7 +6496,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. @@ -6441,8 +6533,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. @@ -6542,6 +6634,258 @@ 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: [Output Only] 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: + // "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 @@ -6723,8 +7067,8 @@ 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 @@ -7984,8 +8328,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 @@ -8037,6 +8383,12 @@ type VpnTunnel struct { // VPN tunnels. Kind string `json:"kind,omitempty"` + // 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 @@ -8056,7 +8408,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. @@ -8432,7 +8784,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)} @@ -8573,7 +8925,7 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address } 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": [ @@ -8620,6 +8972,27 @@ func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Address } +// Pages invokes f for each page of results. +// 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 { @@ -9052,7 +9425,7 @@ type AddressesListCall struct { ctx_ context.Context } -// List: Retrieves the list of address resources contained within the +// List: Retrieves a list of address resources 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 { @@ -9196,7 +9569,7 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro } return ret, nil // { - // "description": "Retrieves the list of address resources contained within the specified region.", + // "description": "Retrieves a list of address resources contained within the specified region.", // "httpMethod": "GET", // "id": "compute.addresses.list", // "parameterOrder": [ @@ -9251,6 +9624,27 @@ func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, erro } +// Pages invokes f for each page of results. +// 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 { @@ -9261,7 +9655,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 @@ -9401,7 +9795,7 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos } 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": [ @@ -9448,6 +9842,27 @@ func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*Autos } +// Pages invokes f for each page of results. +// 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 { @@ -9877,7 +10292,7 @@ type AutoscalersListCall struct { ctx_ context.Context } -// List: Retrieves the list of autoscaler resources contained within the +// List: Retrieves a list of autoscaler resources contained within the // specified zone. func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall { c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -10020,7 +10435,7 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, } return ret, nil // { - // "description": "Retrieves the list of autoscaler resources contained within the specified zone.", + // "description": "Retrieves a list of autoscaler resources contained within the specified zone.", // "httpMethod": "GET", // "id": "compute.autoscalers.list", // "parameterOrder": [ @@ -10075,6 +10490,27 @@ func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, } +// Pages invokes f for each page of results. +// 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 { @@ -10778,7 +11214,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)} @@ -10862,7 +11300,7 @@ func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation } 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": [ @@ -11091,6 +11529,27 @@ func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServ } +// Pages invokes f for each page of results. +// 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 { @@ -11102,8 +11561,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)} @@ -11189,7 +11650,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } 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": [ @@ -11238,7 +11699,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)} @@ -11324,7 +11788,7 @@ func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation } 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": [ @@ -11372,8 +11836,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 type resources. // 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)} @@ -11514,7 +11977,7 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp } return ret, nil // { - // "description": "Retrieves the list of disk type resources grouped by scope.", + // "description": "Retrieves an aggregated list of disk type resources.", // "httpMethod": "GET", // "id": "compute.diskTypes.aggregatedList", // "parameterOrder": [ @@ -11561,6 +12024,27 @@ func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTyp } +// Pages invokes f for each page of results. +// 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 { @@ -11722,7 +12206,7 @@ type DiskTypesListCall struct { ctx_ context.Context } -// List: Retrieves the list of disk type resources available to the +// List: Retrieves a list of disk type resources 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 { @@ -11866,7 +12350,7 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, err } return ret, nil // { - // "description": "Retrieves the list of disk type resources available to the specified project.", + // "description": "Retrieves a list of disk type resources available to the specified project.", // "httpMethod": "GET", // "id": "compute.diskTypes.list", // "parameterOrder": [ @@ -11921,6 +12405,27 @@ func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, 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 *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 { @@ -11931,8 +12436,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)} @@ -12073,7 +12577,7 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } 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": [ @@ -12120,6 +12624,27 @@ func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggrega } +// Pages invokes f for each page of results. +// 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 { @@ -12713,7 +13238,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 { @@ -12857,7 +13382,7 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*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": [ @@ -12912,6 +13437,27 @@ func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*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.firewalls.delete": type FirewallsDeleteCall struct { @@ -13499,6 +14045,27 @@ func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, 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 *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 { @@ -13781,8 +14348,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)} @@ -13923,7 +14489,7 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } 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": [ @@ -13970,6 +14536,27 @@ func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*F } +// Pages invokes f for each page of results. +// 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 { @@ -14402,7 +14989,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 { @@ -14546,7 +15133,7 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR } 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": [ @@ -14601,6 +15188,27 @@ func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingR } +// Pages invokes f for each page of results. +// 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 { @@ -15146,7 +15754,7 @@ type GlobalAddressesListCall struct { ctx_ context.Context } -// List: Retrieves the list of global address resources. +// List: Retrieves a list of global address resources. // 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)} @@ -15287,7 +15895,7 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList } return ret, nil // { - // "description": "Retrieves the list of global address resources.", + // "description": "Retrieves a list of global address resources.", // "httpMethod": "GET", // "id": "compute.globalAddresses.list", // "parameterOrder": [ @@ -15334,6 +15942,27 @@ func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList } +// Pages invokes f for each page of results. +// 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 { @@ -15732,7 +16361,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 { @@ -15874,7 +16503,7 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa } 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": [ @@ -15921,6 +16550,27 @@ func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*Forwa } +// Pages invokes f for each page of results. +// 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 { @@ -16067,8 +16717,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)} @@ -16209,7 +16858,7 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* } 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": [ @@ -16256,6 +16905,27 @@ func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (* } +// Pages invokes f for each page of results. +// 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 { @@ -16502,7 +17172,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 { @@ -16644,7 +17314,7 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } 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": [ @@ -16691,6 +17361,27 @@ func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } +// Pages invokes f for each page of results. +// 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 { @@ -17278,6 +17969,27 @@ func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealth } +// Pages invokes f for each page of results. +// 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 { @@ -18134,6 +18846,27 @@ func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHeal } +// Pages invokes f for each page of results. +// 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 { @@ -19140,6 +19873,27 @@ func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*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 { @@ -19490,6 +20244,27 @@ func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOptio } +// Pages invokes f for each page of results. +// 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 { @@ -19502,7 +20277,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 @@ -19582,7 +20359,7 @@ func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Ope } 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": [ @@ -20268,6 +21045,27 @@ func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*Insta } +// Pages invokes f for each page of results. +// 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 { @@ -21011,8 +21809,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. +// group. 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 @@ -21099,7 +21896,7 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper } 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. Read Adding instances for more information.", // "httpMethod": "POST", // "id": "compute.instanceGroups.addInstances", // "parameterOrder": [ @@ -21341,6 +22138,27 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In } +// Pages invokes f for each page of results. +// 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 { @@ -21353,7 +22171,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 @@ -21433,7 +22253,7 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, } 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": [ @@ -21963,6 +22783,27 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou } +// Pages invokes f for each page of results. +// 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 { @@ -22738,7 +23579,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)} @@ -22822,7 +23666,7 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati } 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": [ @@ -23051,6 +23895,27 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT } +// Pages invokes f for each page of results. +// 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 { @@ -23404,6 +24269,27 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc } +// Pages invokes f for each page of results. +// 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 { @@ -24645,6 +25531,27 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, 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 *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 { @@ -24933,6 +25840,152 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper } +// 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 { @@ -25384,9 +26437,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)} @@ -25467,7 +26520,7 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*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": [ @@ -25521,13 +26574,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)} @@ -25608,7 +26661,7 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*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": [ @@ -25800,8 +26853,8 @@ type MachineTypesAggregatedListCall struct { ctx_ context.Context } -// AggregatedList: Retrieves the list of machine type resources grouped -// by scope. +// AggregatedList: Retrieves an aggregated list of machine type +// resources. // 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)} @@ -25942,7 +26995,7 @@ func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Mach } return ret, nil // { - // "description": "Retrieves the list of machine type resources grouped by scope.", + // "description": "Retrieves an aggregated list of machine type resources.", // "httpMethod": "GET", // "id": "compute.machineTypes.aggregatedList", // "parameterOrder": [ @@ -25989,6 +27042,27 @@ func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Mach } +// Pages invokes f for each page of results. +// 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 { @@ -26150,7 +27224,7 @@ type MachineTypesListCall struct { ctx_ context.Context } -// List: Retrieves the list of machine type resources available to the +// List: Retrieves a list of machine type resources 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 { @@ -26294,7 +27368,7 @@ func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeLis } return ret, nil // { - // "description": "Retrieves the list of machine type resources available to the specified project.", + // "description": "Retrieves a list of machine type resources available to the specified project.", // "httpMethod": "GET", // "id": "compute.machineTypes.list", // "parameterOrder": [ @@ -26349,6 +27423,27 @@ func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeLis } +// Pages invokes f for each page of results. +// 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 { @@ -26936,6 +28031,27 @@ func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*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 { @@ -27804,7 +28920,7 @@ func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, // "type": "string" // }, // "region": { - // "description": "Name of the zone scoping this request.", + // "description": "Name of the region scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, @@ -27835,7 +28951,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 { @@ -27979,7 +29095,7 @@ func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } 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": [ @@ -28034,6 +29150,27 @@ func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationL } +// Pages invokes f for each page of results. +// 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 { @@ -28372,6 +29509,27 @@ func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*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 { @@ -28959,6 +30117,27 @@ func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*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 { @@ -29427,6 +30606,27 @@ func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, 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 *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 { @@ -30010,6 +31210,893 @@ func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertific } +// Pages invokes f for each page of results. +// 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, 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. +// +// 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 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. +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, 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.", + // "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.", + // "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. +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.", + // "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, 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. +// +// 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 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. +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, 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.", + // "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.", + // "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 { @@ -30597,6 +32684,27 @@ func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHtt } +// Pages invokes f for each page of results. +// 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 { @@ -31315,6 +33423,27 @@ func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHt } +// Pages invokes f for each page of results. +// 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 { @@ -31593,8 +33722,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)} @@ -31735,7 +33863,7 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T } 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": [ @@ -31782,6 +33910,27 @@ func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*T } +// Pages invokes f for each page of results. +// 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 { @@ -32214,7 +34363,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 { @@ -32358,7 +34507,7 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta } 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": [ @@ -32413,6 +34562,27 @@ func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInsta } +// Pages invokes f for each page of results. +// 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 { @@ -32713,7 +34883,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)} @@ -32854,7 +35024,7 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe } 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": [ @@ -32901,6 +35071,27 @@ func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*Targe } +// Pages invokes f for each page of results. +// 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 { @@ -33199,7 +35390,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 given instance that is referenced by the given TargetPool. // 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)} @@ -33287,7 +35478,7 @@ func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPool } 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 given instance that is referenced by the given TargetPool.", // "httpMethod": "POST", // "id": "compute.targetPools.getHealth", // "parameterOrder": [ @@ -33480,7 +35671,7 @@ type TargetPoolsListCall struct { ctx_ context.Context } -// List: Retrieves the list of TargetPool resources available to the +// List: Retrieves a list of TargetPool resources 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 { @@ -33624,7 +35815,7 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, } return ret, nil // { - // "description": "Retrieves the list of TargetPool resources available to the specified project and region.", + // "description": "Retrieves a list of TargetPool resources available to the specified project and region.", // "httpMethod": "GET", // "id": "compute.targetPools.list", // "parameterOrder": [ @@ -33679,6 +35870,27 @@ func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, } +// Pages invokes f for each page of results. +// 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 { @@ -34138,8 +36350,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 @@ -34279,7 +36490,7 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) ( } 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": [ @@ -34326,6 +36537,27 @@ func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) ( } +// Pages invokes f for each page of results. +// 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 { @@ -34755,8 +36987,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 TargetVpnGateway resources 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 @@ -34898,7 +37130,7 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn } return ret, nil // { - // "description": "Retrieves the list of TargetVpnGateway resources available to the specified project and region.", + // "description": "Retrieves a list of TargetVpnGateway resources available to the specified project and region.", // "httpMethod": "GET", // "id": "compute.targetVpnGateways.list", // "parameterOrder": [ @@ -34953,6 +37185,27 @@ func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpn } +// Pages invokes f for each page of results. +// 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 { @@ -35540,6 +37793,27 @@ func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*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 { @@ -35551,7 +37825,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 { @@ -35638,7 +37912,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*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": [ @@ -35687,7 +37961,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)} @@ -35773,7 +38047,7 @@ func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*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": [ @@ -35822,7 +38096,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 @@ -35910,7 +38184,7 @@ func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidate } 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": [ @@ -35958,7 +38232,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 @@ -36098,7 +38372,7 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun } 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": [ @@ -36145,6 +38419,27 @@ func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTun } +// Pages invokes f for each page of results. +// 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 { @@ -36574,7 +38869,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)} @@ -36717,7 +39012,7 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, e } 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": [ @@ -36772,6 +39067,27 @@ func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, 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 *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 { @@ -37041,7 +39357,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 { @@ -37185,7 +39501,7 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis } 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": [ @@ -37240,6 +39556,27 @@ func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationLis } +// Pages invokes f for each page of results. +// 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 { @@ -37577,3 +39914,24 @@ func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*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/dns/v1/dns-gen.go b/vendor/google.golang.org/api/dns/v1/dns-gen.go index a0a2e72fd..0d74b6f3d 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-gen.go +++ b/vendor/google.golang.org/api/dns/v1/dns-gen.go @@ -949,6 +949,27 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) 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 "dns.managedZones.create": type ManagedZonesCreateCall struct { @@ -1469,6 +1490,27 @@ func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesLi } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) 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 "dns.projects.get": type ProjectsGetCall struct { @@ -1785,3 +1827,24 @@ func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*Resource // } } + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) 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/gensupport/backoff.go b/vendor/google.golang.org/api/gensupport/backoff.go new file mode 100644 index 000000000..0cc3e406b --- /dev/null +++ b/vendor/google.golang.org/api/gensupport/backoff.go @@ -0,0 +1,34 @@ +// 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 "time" + +type BackoffStrategy interface { + // Pause returns the duration of the next pause before a retry should be attempted. + Pause() time.Duration + + // Reset restores the strategy to its initial state. + Reset() +} + +type ExponentialBackoff struct { + BasePause time.Duration + nextPause time.Duration +} + +func (eb *ExponentialBackoff) Pause() time.Duration { + if eb.nextPause == 0 { + eb.Reset() + } + + d := eb.nextPause + eb.nextPause *= 2 + return d +} + +func (eb *ExponentialBackoff) Reset() { + eb.nextPause = eb.BasePause +} diff --git a/vendor/google.golang.org/api/gensupport/params.go b/vendor/google.golang.org/api/gensupport/params.go index 1dd747921..3b3c74396 100644 --- a/vendor/google.golang.org/api/gensupport/params.go +++ b/vendor/google.golang.org/api/gensupport/params.go @@ -14,6 +14,15 @@ import ( // 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) { diff --git a/vendor/google.golang.org/api/gensupport/resumable.go b/vendor/google.golang.org/api/gensupport/resumable.go index ff11a1bed..adefc8897 100644 --- a/vendor/google.golang.org/api/gensupport/resumable.go +++ b/vendor/google.golang.org/api/gensupport/resumable.go @@ -20,9 +20,10 @@ const ( statusResumeIncomplete = 308 ) -// uploadPause determines the delay between failed upload attempts -// TODO(mcgreevy): improve this retry mechanism. -var uploadPause = 1 * time.Second +// DefaultBackoffStrategy returns a default strategy to use for retrying failed upload requests. +func DefaultBackoffStrategy() BackoffStrategy { + return &ExponentialBackoff{BasePause: time.Second} +} // ResumableUpload is used by the generated APIs to provide resumable uploads. // It is not used by developers directly. @@ -41,6 +42,9 @@ type ResumableUpload struct { // 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. @@ -50,68 +54,105 @@ func (rx *ResumableUpload) Progress() int64 { return rx.progress } -func (rx *ResumableUpload) transferChunks(ctx context.Context) (*http.Response, error) { - var res *http.Response - var err error - - for { - select { // Check for cancellation - case <-ctx.Done(): - return nil, ctx.Err() - default: - } - - chunk, off, size, e := rx.Media.Chunk() - reqSize := int64(size) - done := e == io.EOF - - if !done && e != nil { - return nil, e - } - - req, _ := http.NewRequest("POST", rx.URI, chunk) - req.ContentLength = reqSize - var contentRange string - if done { - if reqSize == 0 { - contentRange = fmt.Sprintf("bytes */%v", off) - } else { - contentRange = fmt.Sprintf("bytes %v-%v/%v", off, off+reqSize-1, off+reqSize) - } - } else { - contentRange = fmt.Sprintf("bytes %v-%v/*", off, off+reqSize-1) - } - req.Header.Set("Content-Range", contentRange) - req.Header.Set("Content-Type", rx.MediaType) - req.Header.Set("User-Agent", rx.UserAgent) - res, err = ctxhttp.Do(ctx, rx.Client, req) - - success := err == nil && res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK - if success && reqSize > 0 { - rx.mu.Lock() - rx.progress = off + reqSize // number of bytes sent so far - rx.mu.Unlock() - if rx.Callback != nil { - rx.Callback(off + reqSize) - } - } - if err != nil || res.StatusCode != statusResumeIncomplete { - break - } - rx.Media.Next() - res.Body.Close() +// 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 } - return res, err } // 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 retries indefinitely (using exponential backoff) 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. // 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 { - resp, err = rx.transferChunks(ctx) + // 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) // 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. @@ -125,10 +166,12 @@ func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err return resp, nil } resp.Body.Close() - select { // Check for cancellation - case <-ctx.Done(): - return nil, ctx.Err() - case <-time.After(uploadPause): + + if resp.StatusCode == statusResumeIncomplete { + pause = 0 + backoff.Reset() + } else { + pause = backoff.Pause() } } } diff --git a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go index b2aa89daa..951a29307 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go @@ -1514,6 +1514,27 @@ func (c *ProjectsSubscriptionsListCall) Do(opts ...googleapi.CallOption) (*ListS } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsSubscriptionsListCall) Pages(ctx context.Context, f func(*ListSubscriptionsResponse) 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 "pubsub.projects.subscriptions.modifyAckDeadline": type ProjectsSubscriptionsModifyAckDeadlineCall struct { @@ -2788,6 +2809,27 @@ func (c *ProjectsTopicsListCall) Do(opts ...googleapi.CallOption) (*ListTopicsRe } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsTopicsListCall) Pages(ctx context.Context, f func(*ListTopicsResponse) 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 "pubsub.projects.topics.publish": type ProjectsTopicsPublishCall struct { @@ -3314,3 +3356,24 @@ func (c *ProjectsTopicsSubscriptionsListCall) Do(opts ...googleapi.CallOption) ( // } } + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsTopicsSubscriptionsListCall) Pages(ctx context.Context, f func(*ListTopicSubscriptionsResponse) 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/sqladmin/v1beta4/sqladmin-gen.go b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go index 9f18b942b..cfe634ce3 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go @@ -2282,6 +2282,27 @@ func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListRe } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) 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 "sql.databases.delete": type DatabasesDeleteCall struct { @@ -4285,6 +4306,27 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResp } +// Pages invokes f for each page of results. +// 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(*InstancesListResponse) 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 "sql.instances.patch": type InstancesPatchCall struct { @@ -5594,6 +5636,27 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListRe } +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) 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 "sql.sslCerts.createEphemeral": type SslCertsCreateEphemeralCall struct { diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index 439d42afd..4f4e9ef41 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/iW6lW-fzl_pGlxeRN7h4J2G0OTQ\"", + "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/obxe7w0FjJgGPQFNs6hMClVbJfI\"", "discoveryVersion": "v1", "id": "storage:v1", "name": "storage", "version": "v1", - "revision": "20151229", + "revision": "20160121", "title": "Cloud Storage JSON API", "description": "Lets you store and retrieve potentially-large, immutable data objects.", "ownerDomain": "google.com", @@ -574,13 +574,7 @@ }, "contentType": { "type": "string", - "description": "Content-Type of the object data.", - "annotations": { - "required": [ - "storage.objects.insert", - "storage.objects.update" - ] - } + "description": "Content-Type of the object data." }, "crc32c": { "type": "string", diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index f5c5f23eb..89ab8b7ba 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -2596,6 +2596,27 @@ func (c *BucketsListCall) Do(opts ...googleapi.CallOption) (*Buckets, 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 *BucketsListCall) Pages(ctx context.Context, f func(*Buckets) 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 "storage.buckets.patch": type BucketsPatchCall struct { @@ -6464,6 +6485,27 @@ func (c *ObjectsListCall) Do(opts ...googleapi.CallOption) (*Objects, 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 *ObjectsListCall) Pages(ctx context.Context, f func(*Objects) 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 "storage.objects.patch": type ObjectsPatchCall struct {