diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 969bd5c5e0c..0b2a3ddbb76 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes", - "GoVersion": "go1.3.1", + "GoVersion": "go1.3", "Packages": [ "./..." ], @@ -42,12 +42,17 @@ { "ImportPath": "code.google.com/p/google-api-go-client/compute/v1", "Comment": "release-96", - "Rev": "0923cdda5b82a7dd0dd5c689f824ca5e7d9b60de" + "Rev": "98c78185197025f935947caac56a7b6d022f89d2" + }, + { + "ImportPath": "code.google.com/p/google-api-go-client/container/v1beta1", + "Comment": "release-105", + "Rev": "98c78185197025f935947caac56a7b6d022f89d2" }, { "ImportPath": "code.google.com/p/google-api-go-client/googleapi", "Comment": "release-96", - "Rev": "0923cdda5b82a7dd0dd5c689f824ca5e7d9b60de" + "Rev": "98c78185197025f935947caac56a7b6d022f89d2" }, { "ImportPath": "github.com/coreos/go-etcd/etcd", diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/AUTHORS b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/AUTHORS new file mode 100644 index 00000000000..f73b7257457 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/AUTHORS @@ -0,0 +1,10 @@ +# This is the official list of authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. +Google Inc. diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/CONTRIBUTORS b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/CONTRIBUTORS new file mode 100644 index 00000000000..4af9298dd94 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/CONTRIBUTORS @@ -0,0 +1,46 @@ +# This is the official list of people who can contribute +# (and typically have contributed) code to the repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# The submission process automatically checks to make sure +# that people submitting code are listed in this file (by email address). +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# http://code.google.com/legal/individual-cla-v1.0.html +# http://code.google.com/legal/corporate-cla-v1.0.html +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. + +# Names should be added to this file like so: +# Name +# +# An entry with two email addresses specifies that the +# first address should be used in the submit logs and +# that the second address should be recognized as the +# same person when interacting with Rietveld. + +# Please keep the list sorted. + +Alain Vongsouvanhalainv +Andrew Gerrand +Brad Fitzpatrick +Francesc Campoy +Garrick Evans +Glenn Lewis +Ivan Krasin +Jason Hall +Johan Euphrosine +Kostik Shtoyk +Nick Craig-Wood +Scott Van Woudenberg +Takashi Matsuo diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/LICENSE b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/LICENSE new file mode 100644 index 00000000000..263aa7a0c12 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/Makefile b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/Makefile new file mode 100644 index 00000000000..20ce8a5f702 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/Makefile @@ -0,0 +1,9 @@ +all: + go install code.google.com/p/google-api-go-client/googleapi + go install code.google.com/p/google-api-go-client/google-api-go-generator + $(GOPATH)/bin/google-api-go-generator -cache=false -install -api=* + +cached: + go install code.google.com/p/google-api-go-client/googleapi + go install code.google.com/p/google-api-go-client/google-api-go-generator + $(GOPATH)/bin/google-api-go-generator -cache=true -install -api=* diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/NOTES b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/NOTES new file mode 100644 index 00000000000..3b10889900a --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/NOTES @@ -0,0 +1,13 @@ +Discovery Service: +http://code.google.com/apis/discovery/ +http://code.google.com/apis/discovery/v1/reference.html + +The "type" key: +http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 + +The "format" key: +http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23 +http://code.google.com/apis/discovery/v1/reference.html#parameter-format-summary + +Google JSON format docs: +http://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/README b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/README new file mode 100644 index 00000000000..9aca57bf6f3 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/README @@ -0,0 +1,10 @@ +Most of this project is auto-generated. + +The notable directories which are not auto-generated: + + google-api-go-generator/ -- the generator itself + google-api/ -- shared common code, used by auto-generated code + examples/ -- sample code + +When changing the generator, re-compile all APIs and submit the +modified APIs in the same CL as the generator changes itself. diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/TODO b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/TODO new file mode 100644 index 00000000000..af55f146c77 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/TODO @@ -0,0 +1,2 @@ +Moved to: +http://code.google.com/p/google-api-go-client/issues/ diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-api.json b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-api.json index ec71edb9cbe..726a0ac363d 100644 --- a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-api.json +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-api.json @@ -1,18 +1,18 @@ { "kind": "discovery#restDescription", - "etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/Qrs2SriggaSYO28pp7DFm8wFPbo\"", + "etag": "\"l66ggWbucbkBw9Lpos72oziyefE/qp3DHGvWPpREzEdWk7WwxnpgC9w\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20140625", + "revision": "20141014", "title": "Compute Engine API", "description": "API for the Google Compute Engine service.", "ownerDomain": "google.com", "ownerName": "Google", "icons": { - "x16": "http://www.google.com/images/icons/product/compute_engine-16.png", - "x32": "http://www.google.com/images/icons/product/compute_engine-32.png" + "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", + "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" }, "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", "protocol": "rest", @@ -345,6 +345,17 @@ "$ref": "AttachedDiskInitializeParams", "description": "Initialization parameters." }, + "interface": { + "type": "string", + "enum": [ + "NVME", + "SCSI" + ], + "enumDescriptions": [ + "", + "" + ] + }, "kind": { "type": "string", "description": "Type of the resource.", @@ -395,7 +406,7 @@ "AttachedDiskInitializeParams": { "id": "AttachedDiskInitializeParams", "type": "object", - "description": "Initialization parameters for the new disk (Mutually exclusive with 'source', can currently only be specified on the boot disk).", + "description": "Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'.", "properties": { "diskName": { "type": "string", @@ -444,7 +455,7 @@ }, "group": { "type": "string", - "description": "URL of a zonal Cloud Resource View resource. This resoure view defines the list of instances that serve traffic. Member virtual machine instances from each resource view must live in the same zone as the resource view itself." + "description": "URL of a zonal Cloud Resource View resource. This resource view defines the list of instances that serve traffic. Member virtual machine instances from each resource view must live in the same zone as the resource view itself. No two backends in a backend service are allowed to use same Resource View resource." }, "maxRate": { "type": "integer", @@ -512,9 +523,13 @@ }, "port": { "type": "integer", - "description": "The TCP port to connect on the backend. The default value is 80.", + "description": "Deprecated in favor of port_name. The TCP port to connect on the backend. The default value is 80.", "format": "int32" }, + "portName": { + "type": "string", + "description": "Name of backend port. The same name should appear in the resource views referenced by this service. Required." + }, "protocol": { "type": "string", "enum": [ @@ -675,7 +690,7 @@ }, "sourceImage": { "type": "string", - "description": "The source image used to create this disk. Once the source image has been deleted from the system, this field will not be set, even if an image with the same name has been re-created." + "description": "The source image used to create this disk." }, "sourceImageId": { "type": "string", @@ -683,7 +698,7 @@ }, "sourceSnapshot": { "type": "string", - "description": "The source snapshot used to create this disk. Once the source snapshot has been deleted from the system, this field will be cleared, and will not be set even if a snapshot with the same name has been re-created." + "description": "The source snapshot used to create this disk." }, "sourceSnapshotId": { "type": "string", @@ -786,6 +801,11 @@ "type": "string", "description": "Creation timestamp in RFC3339 text format (output only)." }, + "defaultDiskSizeGb": { + "type": "string", + "description": "Server defined default disk size in gb (output only).", + "format": "int64" + }, "deprecated": { "$ref": "DeprecationStatus", "description": "The deprecation status associated with this disk type." @@ -1085,13 +1105,7 @@ }, "network": { "type": "string", - "description": "URL of the network to which this firewall is applied; provided by the client when the firewall is created.", - "annotations": { - "required": [ - "compute.firewalls.insert", - "compute.firewalls.patch" - ] - } + "description": "URL of the network to which this firewall is applied; provided by the client when the firewall is created." }, "selfLink": { "type": "string", @@ -1162,7 +1176,7 @@ }, "IPProtocol": { "type": "string", - "description": "The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'", + "description": "The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'.", "enum": [ "AH", "ESP", @@ -1203,7 +1217,7 @@ }, "portRange": { "type": "string", - "description": "Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets addressed to ports in the specified range will be forwarded to 'target'. If 'portRange' is left empty (default value), all ports are forwarded. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. @pattern: \\d+(?:-\\d+)?" + "description": "Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets addressed to ports in the specified range will be forwarded to 'target'. If 'portRange' is left empty (default value), all ports are forwarded. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges." }, "region": { "type": "string", @@ -1385,6 +1399,11 @@ "ipAddress": { "type": "string", "description": "The IP address represented by this resource." + }, + "port": { + "type": "integer", + "description": "The port on the instance.", + "format": "int32" } } }, @@ -1398,7 +1417,7 @@ }, "hosts": { "type": "array", - "description": "The list of host patterns to match. They must be FQDN except that it may start with ?*.? or ?*-?. The ?*? acts like a glob and will match any string of atoms (separated by .?s and -?s) to the left.", + "description": "The list of host patterns to match. They must be valid hostnames except that they may start with *. or *-. The * acts like a glob and will match any string of atoms (separated by .s and -s) to the left.", "items": { "type": "string" } @@ -1597,7 +1616,7 @@ }, "sourceDisk": { "type": "string", - "description": "The source disk used to create this image. Once the source disk has been deleted from the system, this field will be cleared, and will not be set even if a disk with the same name has been re-created." + "description": "The source disk used to create this image." }, "sourceDiskId": { "type": "string", @@ -1836,6 +1855,63 @@ } } }, + "InstanceProperties": { + "id": "InstanceProperties", + "type": "object", + "description": "", + "properties": { + "canIpForward": { + "type": "boolean", + "description": "Allows instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false." + }, + "description": { + "type": "string", + "description": "An optional textual description for the instances created based on the instance template resource; provided by the client when the template is created." + }, + "disks": { + "type": "array", + "description": "Array of disks associated with instance created based on this template.", + "items": { + "$ref": "AttachedDisk" + } + }, + "machineType": { + "type": "string", + "description": "Name of the machine type resource describing which machine type to use to host the instances created based on this template; provided by the client when the instance template is created.", + "annotations": { + "required": [ + "compute.instanceTemplates.insert" + ] + } + }, + "metadata": { + "$ref": "Metadata", + "description": "Metadata key/value pairs assigned to instances created based on this template. Consists of custom metadata or predefined keys; see Instance documentation for more information." + }, + "networkInterfaces": { + "type": "array", + "description": "Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instances created based based on this template will have no external internet access.", + "items": { + "$ref": "NetworkInterface" + } + }, + "scheduling": { + "$ref": "Scheduling", + "description": "Scheduling options for the instances created based on this template." + }, + "serviceAccounts": { + "type": "array", + "description": "A list of service accounts each with specified scopes, for which access tokens are to be made available to the instances created based on this template, through metadata queries.", + "items": { + "$ref": "ServiceAccount" + } + }, + "tags": { + "$ref": "Tags", + "description": "A list of tags to be applied to the instances created based on this template used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." + } + } + }, "InstanceReference": { "id": "InstanceReference", "type": "object", @@ -1845,6 +1921,80 @@ } } }, + "InstanceTemplate": { + "id": "InstanceTemplate", + "type": "object", + "description": "An Instance Template resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the instance template resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#instanceTemplate" + }, + "name": { + "type": "string", + "description": "Name of the instance template resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.instanceTemplates.insert" + ] + } + }, + "properties": { + "$ref": "InstanceProperties", + "description": "The instance properties portion of this instance template resource." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + } + } + }, + "InstanceTemplateList": { + "id": "InstanceTemplateList", + "type": "object", + "description": "Contains a list of instance template resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "A list of instance template resources.", + "items": { + "$ref": "InstanceTemplate" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#instanceTemplateList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, "InstancesScopedList": { "id": "InstancesScopedList", "type": "object", @@ -1922,9 +2072,13 @@ "type": "object", "description": "A license resource.", "properties": { + "chargesUseFee": { + "type": "boolean", + "description": "If true, the customer will be charged license fee for running software that contains this license on an instance." + }, "kind": { "type": "string", - "description": "Identifies what kind of resource this is. Value: the fixed string \"compute#license\".", + "description": "Type of resource.", "default": "compute#license" }, "name": { @@ -2678,7 +2832,7 @@ "properties": { "paths": { "type": "array", - "description": "The list of path patterns to match. Each must start with ?/\" and the only place a \"*\" is allowed is at the end following a \"/\". The string fed to the path matcher does not include any text after the first \"?\" or \"#\", and those chars are not allowed here.", + "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", "items": { "type": "string" } @@ -2765,6 +2919,7 @@ "IN_USE_ADDRESSES", "KERNELS", "KERNELS_TOTAL_GB", + "LOCAL_SSD_TOTAL_GB", "NETWORKS", "OPERATIONS", "ROUTES", @@ -2800,6 +2955,7 @@ "", "", "", + "", "" ] }, @@ -2909,7 +3065,8 @@ "type": "object", "properties": { "group": { - "type": "string" + "type": "string", + "description": "A URI referencing one of the resource views listed in the backend service." } } }, @@ -3208,7 +3365,7 @@ }, "sourceDisk": { "type": "string", - "description": "The source disk used to create this snapshot. Once the source disk has been deleted from the system, this field will be cleared, and will not be set even if a disk with the same name has been re-created (output only)." + "description": "The source disk used to create this snapshot." }, "sourceDiskId": { "type": "string", @@ -6351,6 +6508,146 @@ } } }, + "instanceTemplates": { + "methods": { + "delete": { + "id": "compute.instanceTemplates.delete", + "path": "{project}/global/instanceTemplates/{instanceTemplate}", + "httpMethod": "DELETE", + "description": "Deletes the specified instance template resource.", + "parameters": { + "instanceTemplate": { + "type": "string", + "description": "Name of the instance template resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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", + "instanceTemplate" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.instanceTemplates.get", + "path": "{project}/global/instanceTemplates/{instanceTemplate}", + "httpMethod": "GET", + "description": "Returns the specified instance template resource.", + "parameters": { + "instanceTemplate": { + "type": "string", + "description": "Name of the instance template resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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", + "instanceTemplate" + ], + "response": { + "$ref": "InstanceTemplate" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.instanceTemplates.insert", + "path": "{project}/global/instanceTemplates", + "httpMethod": "POST", + "description": "Creates an instance template resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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" + ], + "request": { + "$ref": "InstanceTemplate" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.instanceTemplates.list", + "path": "{project}/global/instanceTemplates", + "httpMethod": "GET", + "description": "Retrieves the list of instance template resources contained within the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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": "InstanceTemplateList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "instances": { "methods": { "addAccessConfig": { diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-gen.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-gen.go index 294df37ec35..7d193b56b84 100644 --- a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-gen.go +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/compute-gen.go @@ -73,6 +73,7 @@ func New(client *http.Client) (*Service, error) { s.GlobalOperations = NewGlobalOperationsService(s) s.HttpHealthChecks = NewHttpHealthChecksService(s) s.Images = NewImagesService(s) + s.InstanceTemplates = NewInstanceTemplatesService(s) s.Instances = NewInstancesService(s) s.Licenses = NewLicensesService(s) s.MachineTypes = NewMachineTypesService(s) @@ -117,6 +118,8 @@ type Service struct { Images *ImagesService + InstanceTemplates *InstanceTemplatesService + Instances *InstancesService Licenses *LicensesService @@ -247,6 +250,15 @@ type ImagesService struct { s *Service } +func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { + rs := &InstanceTemplatesService{s: s} + return rs +} + +type InstanceTemplatesService struct { + s *Service +} + func NewInstancesService(s *Service) *InstancesService { rs := &InstancesService{s: s} return rs @@ -528,6 +540,8 @@ type AttachedDisk struct { // InitializeParams: Initialization parameters. InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` + Interface string `json:"interface,omitempty"` + // Kind: Type of the resource. Kind string `json:"kind,omitempty"` @@ -579,10 +593,11 @@ type Backend struct { // is provided by the client when the resource is created. Description string `json:"description,omitempty"` - // Group: URL of a zonal Cloud Resource View resource. This resoure view - // defines the list of instances that serve traffic. Member virtual + // Group: URL of a zonal Cloud Resource View resource. This resource + // view defines the list of instances that serve traffic. Member virtual // machine instances from each resource view must live in the same zone - // as the resource view itself. + // as the resource view itself. No two backends in a backend service are + // allowed to use same Resource View resource. Group string `json:"group,omitempty"` // MaxRate: The max RPS of the group. Can be used with either balancing @@ -637,10 +652,14 @@ type BackendService struct { // RFC1035. Name string `json:"name,omitempty"` - // Port: The TCP port to connect on the backend. The default value is - // 80. + // Port: Deprecated in favor of port_name. The TCP port to connect on + // the backend. The default value is 80. Port int64 `json:"port,omitempty"` + // PortName: Name of backend port. The same name should appear in the + // resource views referenced by this service. Required. + PortName string `json:"portName,omitempty"` + Protocol string `json:"protocol,omitempty"` // SelfLink: Server defined URL for the resource (output only). @@ -739,9 +758,7 @@ type Disk struct { // otherwise it is required. SizeGb int64 `json:"sizeGb,omitempty,string"` - // SourceImage: The source image used to create this disk. Once the - // source image has been deleted from the system, this field will not be - // set, even if an image with the same name has been re-created. + // SourceImage: The source image used to create this disk. SourceImage string `json:"sourceImage,omitempty"` // SourceImageId: The 'id' value of the image used to create this disk. @@ -749,10 +766,7 @@ type Disk struct { // the current or a previous instance of a given image. SourceImageId string `json:"sourceImageId,omitempty"` - // SourceSnapshot: The source snapshot used to create this disk. Once - // the source snapshot has been deleted from the system, this field will - // be cleared, and will not be set even if a snapshot with the same name - // has been re-created. + // SourceSnapshot: The source snapshot used to create this disk. SourceSnapshot string `json:"sourceSnapshot,omitempty"` // SourceSnapshotId: The 'id' value of the snapshot used to create this @@ -815,6 +829,10 @@ type DiskType struct { // only). CreationTimestamp string `json:"creationTimestamp,omitempty"` + // DefaultDiskSizeGb: Server defined default disk size in gb (output + // only). + DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` + // Deprecated: The deprecation status associated with this disk type. Deprecated *DeprecationStatus `json:"deprecated,omitempty"` @@ -1034,7 +1052,7 @@ type ForwardingRule struct { IPAddress string `json:"IPAddress,omitempty"` // IPProtocol: The IP protocol to which this rule applies, valid options - // are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP' + // are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'. IPProtocol string `json:"IPProtocol,omitempty"` // CreationTimestamp: Creation timestamp in RFC3339 text format (output @@ -1062,7 +1080,6 @@ type ForwardingRule struct { // be forwarded to 'target'. If 'portRange' is left empty (default // value), all ports are forwarded. Forwarding rules with the same // [IPAddress, IPProtocol] pair must have disjoint port ranges. - // @pattern: \d+(?:-\d+)? PortRange string `json:"portRange,omitempty"` // Region: URL of the region where the regional forwarding rule resides @@ -1159,15 +1176,18 @@ type HealthStatus struct { // IpAddress: The IP address represented by this resource. IpAddress string `json:"ipAddress,omitempty"` + + // Port: The port on the instance. + Port int64 `json:"port,omitempty"` } type HostRule struct { Description string `json:"description,omitempty"` - // Hosts: The list of host patterns to match. They must be FQDN except - // that it may start with ?*.? or ?*-?. The ?*? acts like a glob and - // will match any string of atoms (separated by .?s and -?s) to the - // left. + // Hosts: The list of host patterns to match. They must be valid + // hostnames except that they may start with *. or *-. The * acts like a + // glob and will match any string of atoms (separated by .s and -s) to + // the left. Hosts []string `json:"hosts,omitempty"` // PathMatcher: The name of the PathMatcher to match the path portion of @@ -1288,10 +1308,7 @@ type Image struct { // SelfLink: Server defined URL for the resource (output only). SelfLink string `json:"selfLink,omitempty"` - // SourceDisk: The source disk used to create this image. Once the - // source disk has been deleted from the system, this field will be - // cleared, and will not be set even if a disk with the same name has - // been re-created. + // SourceDisk: The source disk used to create this image. SourceDisk string `json:"sourceDisk,omitempty"` // SourceDiskId: The 'id' value of the disk used to create this image. @@ -1465,10 +1482,112 @@ type InstanceList struct { SelfLink string `json:"selfLink,omitempty"` } +type InstanceProperties struct { + // CanIpForward: Allows instances created based on this template to send + // packets with source IP addresses other than their own and receive + // packets with destination IP addresses other than their own. If these + // instances will be used as an IP gateway or it will be set as the + // next-hop in a Route resource, say true. If unsure, leave this set to + // false. + CanIpForward bool `json:"canIpForward,omitempty"` + + // Description: An optional textual description for the instances + // created based on the instance template resource; provided by the + // client when the template is created. + Description string `json:"description,omitempty"` + + // Disks: Array of disks associated with instance created based on this + // template. + Disks []*AttachedDisk `json:"disks,omitempty"` + + // MachineType: Name of the machine type resource describing which + // machine type to use to host the instances created based on this + // template; provided by the client when the instance template is + // created. + MachineType string `json:"machineType,omitempty"` + + // Metadata: Metadata key/value pairs assigned to instances created + // based on this template. Consists of custom metadata or predefined + // keys; see Instance documentation for more information. + Metadata *Metadata `json:"metadata,omitempty"` + + // NetworkInterfaces: Array of configurations for this interface. This + // specifies how this interface is configured to interact with other + // network services, such as connecting to the internet. Currently, + // ONE_TO_ONE_NAT is the only access config supported. If there are no + // accessConfigs specified, then this instances created based based on + // this template will have no external internet access. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + + // Scheduling: Scheduling options for the instances created based on + // this template. + Scheduling *Scheduling `json:"scheduling,omitempty"` + + // ServiceAccounts: A list of service accounts each with specified + // scopes, for which access tokens are to be made available to the + // instances created based on this template, through metadata queries. + ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + + // Tags: A list of tags to be applied to the instances created based on + // this template used to identify valid sources or targets for network + // firewalls. Provided by the client on instance creation. The tags can + // be later modified by the setTags method. Each tag within the list + // must comply with RFC1035. + Tags *Tags `json:"tags,omitempty"` +} + type InstanceReference struct { Instance string `json:"instance,omitempty"` } +type InstanceTemplate struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the instance template + // resource; provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the instance template resource; provided by the client + // when the resource is created. The name must be 1-63 characters long, + // and comply with RFC1035 + Name string `json:"name,omitempty"` + + // Properties: The instance properties portion of this instance template + // resource. + Properties *InstanceProperties `json:"properties,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type InstanceTemplateList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A list of instance template resources. + Items []*InstanceTemplate `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + type InstancesScopedList struct { // Instances: List of instances contained in this scope. Instances []*Instance `json:"instances,omitempty"` @@ -1498,8 +1617,11 @@ type InstancesScopedListWarningData struct { } type License struct { - // Kind: Identifies what kind of resource this is. Value: the fixed - // string "compute#license". + // ChargesUseFee: If true, the customer will be charged license fee for + // running software that contains this license on an instance. + ChargesUseFee bool `json:"chargesUseFee,omitempty"` + + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // Name: Name of the resource; provided by the client when the resource @@ -1944,10 +2066,10 @@ type PathMatcher struct { } type PathRule struct { - // Paths: The list of path patterns to match. Each must start with ?/" - // and the only place a "*" is allowed is at the end following a "/". - // The string fed to the path matcher does not include any text after - // the first "?" or "#", and those chars are not allowed here. + // Paths: The list of path patterns to match. Each must start with / and + // the only place a * is allowed is at the end following a /. The string + // fed to the path matcher does not include any text after the first ? + // or #, and those chars are not allowed here. Paths []string `json:"paths,omitempty"` // Service: The URL of the BackendService resource if this rule is @@ -2054,6 +2176,8 @@ type RegionList struct { } type ResourceGroupReference struct { + // Group: A URI referencing one of the resource views listed in the + // backend service. Group string `json:"group,omitempty"` } @@ -2217,10 +2341,7 @@ type Snapshot struct { // SelfLink: Server defined URL for the resource (output only). SelfLink string `json:"selfLink,omitempty"` - // SourceDisk: The source disk used to create this snapshot. Once the - // source disk has been deleted from the system, this field will be - // cleared, and will not be set even if a disk with the same name has - // been re-created (output only). + // SourceDisk: The source disk used to create this snapshot. SourceDisk string `json:"sourceDisk,omitempty"` // SourceDiskId: The 'id' value of the disk used to create this @@ -2846,6 +2967,14 @@ func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggr 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 *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *AddressesAggregatedListCall) Do() (*AddressAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -2859,6 +2988,9 @@ func (c *AddressesAggregatedListCall) Do() (*AddressAggregatedList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -2945,10 +3077,21 @@ func (r *AddressesService) Delete(project string, region string, address string) 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 *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *AddressesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -3033,10 +3176,21 @@ func (r *AddressesService) Get(project string, region string, address string) *A 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 *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *AddressesGetCall) Do() (*Address, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -3123,6 +3277,14 @@ func (r *AddressesService) Insert(project string, region string, address *Addres 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 *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *AddressesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) @@ -3132,6 +3294,9 @@ func (c *AddressesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -3233,6 +3398,14 @@ func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { 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 *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *AddressesListCall) Do() (*AddressList, error) { var body io.Reader = nil params := make(url.Values) @@ -3246,6 +3419,9 @@ func (c *AddressesListCall) Do() (*AddressList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -3339,10 +3515,21 @@ func (r *BackendServicesService) Delete(project string, backendService string) * 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 *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *BackendServicesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -3416,10 +3603,21 @@ func (r *BackendServicesService) Get(project string, backendService string) *Bac 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 *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *BackendServicesGetCall) Do() (*BackendService, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -3497,6 +3695,14 @@ func (r *BackendServicesService) GetHealth(project string, backendService string 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 *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *BackendServicesGetHealthCall) Do() (*BackendServiceGroupHealth, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) @@ -3506,6 +3712,9 @@ func (c *BackendServicesGetHealthCall) Do() (*BackendServiceGroupHealth, error) ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -3584,6 +3793,14 @@ func (r *BackendServicesService) Insert(project string, backendservice *BackendS 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 *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *BackendServicesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) @@ -3593,6 +3810,9 @@ func (c *BackendServicesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -3683,6 +3903,14 @@ func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesLi 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 *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *BackendServicesListCall) Do() (*BackendServiceList, error) { var body io.Reader = nil params := make(url.Values) @@ -3696,6 +3924,9 @@ func (c *BackendServicesListCall) Do() (*BackendServiceList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -3783,6 +4014,14 @@ func (r *BackendServicesService) Patch(project string, backendService string, ba 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 *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *BackendServicesPatchCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) @@ -3792,6 +4031,9 @@ func (c *BackendServicesPatchCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + params.Encode() req, _ := http.NewRequest("PATCH", urls, body) @@ -3871,6 +4113,14 @@ func (r *BackendServicesService) Update(project string, backendService string, b 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 *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *BackendServicesUpdateCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) @@ -3880,6 +4130,9 @@ func (c *BackendServicesUpdateCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") urls += "?" + params.Encode() req, _ := http.NewRequest("PUT", urls, body) @@ -3979,6 +4232,14 @@ func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggr 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 *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DiskTypesAggregatedListCall) Do() (*DiskTypeAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -3992,6 +4253,9 @@ func (c *DiskTypesAggregatedListCall) Do() (*DiskTypeAggregatedList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -4078,10 +4342,21 @@ func (r *DiskTypesService) Get(project string, zone string, diskType string) *Di 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 *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DiskTypesGetCall) Do() (*DiskType, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -4189,6 +4464,14 @@ func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { 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 *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DiskTypesListCall) Do() (*DiskTypeList, error) { var body io.Reader = nil params := make(url.Values) @@ -4202,6 +4485,9 @@ func (c *DiskTypesListCall) Do() (*DiskTypeList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -4316,6 +4602,14 @@ func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedLi 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 *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DisksAggregatedListCall) Do() (*DiskAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -4329,6 +4623,9 @@ func (c *DisksAggregatedListCall) Do() (*DiskAggregatedList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -4417,6 +4714,14 @@ func (r *DisksService) CreateSnapshot(project string, zone string, disk string, 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 *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DisksCreateSnapshotCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) @@ -4426,6 +4731,9 @@ func (c *DisksCreateSnapshotCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -4513,10 +4821,21 @@ func (r *DisksService) Delete(project string, zone string, disk string) *DisksDe 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 *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DisksDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -4601,10 +4920,21 @@ func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCa 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 *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DisksGetCall) Do() (*Disk, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -4698,6 +5028,14 @@ func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { 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 *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DisksInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) @@ -4710,6 +5048,9 @@ func (c *DisksInsertCall) Do() (*Operation, error) { if v, ok := c.opt_["sourceImage"]; ok { params.Set("sourceImage", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -4816,6 +5157,14 @@ func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { 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 *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *DisksListCall) Do() (*DiskList, error) { var body io.Reader = nil params := make(url.Values) @@ -4829,6 +5178,9 @@ func (c *DisksListCall) Do() (*DiskList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -4922,10 +5274,21 @@ func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDel 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 *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *FirewallsDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -4999,10 +5362,21 @@ func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCal 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 *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *FirewallsGetCall) Do() (*Firewall, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -5078,6 +5452,14 @@ func (r *FirewallsService) Insert(project string, firewall *Firewall) *Firewalls 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 *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *FirewallsInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) @@ -5087,6 +5469,9 @@ func (c *FirewallsInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -5177,6 +5562,14 @@ func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { 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 *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *FirewallsListCall) Do() (*FirewallList, error) { var body io.Reader = nil params := make(url.Values) @@ -5190,6 +5583,9 @@ func (c *FirewallsListCall) Do() (*FirewallList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -5277,6 +5673,14 @@ func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Fir 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 *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *FirewallsPatchCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) @@ -5286,6 +5690,9 @@ func (c *FirewallsPatchCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + params.Encode() req, _ := http.NewRequest("PATCH", urls, body) @@ -5366,6 +5773,14 @@ func (r *FirewallsService) Update(project string, firewall string, firewall2 *Fi 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 *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *FirewallsUpdateCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) @@ -5375,6 +5790,9 @@ func (c *FirewallsUpdateCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") urls += "?" + params.Encode() req, _ := http.NewRequest("PUT", urls, body) @@ -5474,6 +5892,14 @@ func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *Forward 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 *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ForwardingRulesAggregatedListCall) Do() (*ForwardingRuleAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -5487,6 +5913,9 @@ func (c *ForwardingRulesAggregatedListCall) Do() (*ForwardingRuleAggregatedList, if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -5573,10 +6002,21 @@ func (r *ForwardingRulesService) Delete(project string, region string, forwardin 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 *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ForwardingRulesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -5661,10 +6101,21 @@ func (r *ForwardingRulesService) Get(project string, region string, forwardingRu 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 *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ForwardingRulesGetCall) Do() (*ForwardingRule, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -5751,6 +6202,14 @@ func (r *ForwardingRulesService) Insert(project string, region string, forwardin 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 *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ForwardingRulesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) @@ -5760,6 +6219,9 @@ func (c *ForwardingRulesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -5861,6 +6323,14 @@ func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesLi 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 *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ForwardingRulesListCall) Do() (*ForwardingRuleList, error) { var body io.Reader = nil params := make(url.Values) @@ -5874,6 +6344,9 @@ func (c *ForwardingRulesListCall) Do() (*ForwardingRuleList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -5971,6 +6444,14 @@ func (r *ForwardingRulesService) SetTarget(project string, region string, forwar 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 *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ForwardingRulesSetTargetCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) @@ -5980,6 +6461,9 @@ func (c *ForwardingRulesSetTargetCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -6066,10 +6550,21 @@ func (r *GlobalAddressesService) Delete(project string, address string) *GlobalA 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 *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalAddressesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -6143,10 +6638,21 @@ func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddr 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 *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalAddressesGetCall) Do() (*Address, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -6222,6 +6728,14 @@ func (r *GlobalAddressesService) Insert(project string, address *Address) *Globa 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 *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalAddressesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) @@ -6231,6 +6745,9 @@ func (c *GlobalAddressesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -6320,6 +6837,14 @@ func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesLi 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 *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalAddressesListCall) Do() (*AddressList, error) { var body io.Reader = nil params := make(url.Values) @@ -6333,6 +6858,9 @@ func (c *GlobalAddressesListCall) Do() (*AddressList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -6417,10 +6945,21 @@ func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule str 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 *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalForwardingRulesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -6494,10 +7033,21 @@ func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string 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 *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalForwardingRulesGetCall) Do() (*ForwardingRule, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -6573,6 +7123,14 @@ func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *Fo 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 *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalForwardingRulesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) @@ -6582,6 +7140,9 @@ func (c *GlobalForwardingRulesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -6672,6 +7233,14 @@ func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwa 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 *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalForwardingRulesListCall) Do() (*ForwardingRuleList, error) { var body io.Reader = nil params := make(url.Values) @@ -6685,6 +7254,9 @@ func (c *GlobalForwardingRulesListCall) Do() (*ForwardingRuleList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -6771,6 +7343,14 @@ func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule 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 *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalForwardingRulesSetTargetCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) @@ -6780,6 +7360,9 @@ func (c *GlobalForwardingRulesSetTargetCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -6879,6 +7462,14 @@ func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *Global 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 *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalOperationsAggregatedListCall) Do() (*OperationAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -6892,6 +7483,9 @@ func (c *GlobalOperationsAggregatedListCall) Do() (*OperationAggregatedList, err if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -6976,10 +7570,21 @@ func (r *GlobalOperationsService) Delete(project string, operation string) *Glob 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 *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalOperationsDeleteCall) Do() error { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -7046,10 +7651,21 @@ func (r *GlobalOperationsService) Get(project string, operation string) *GlobalO 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 *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalOperationsGetCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -7146,6 +7762,14 @@ func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperations 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 *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *GlobalOperationsListCall) Do() (*OperationList, error) { var body io.Reader = nil params := make(url.Values) @@ -7159,6 +7783,9 @@ func (c *GlobalOperationsListCall) Do() (*OperationList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -7243,10 +7870,21 @@ func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) 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 *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *HttpHealthChecksDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -7320,10 +7958,21 @@ func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *H 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 *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *HttpHealthChecksGetCall) Do() (*HttpHealthCheck, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -7399,6 +8048,14 @@ func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHe 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 *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *HttpHealthChecksInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) @@ -7408,6 +8065,9 @@ func (c *HttpHealthChecksInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -7498,6 +8158,14 @@ func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecks 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 *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *HttpHealthChecksListCall) Do() (*HttpHealthCheckList, error) { var body io.Reader = nil params := make(url.Values) @@ -7511,6 +8179,9 @@ func (c *HttpHealthChecksListCall) Do() (*HttpHealthCheckList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -7599,6 +8270,14 @@ func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, 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 *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *HttpHealthChecksPatchCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) @@ -7608,6 +8287,9 @@ func (c *HttpHealthChecksPatchCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + params.Encode() req, _ := http.NewRequest("PATCH", urls, body) @@ -7688,6 +8370,14 @@ func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, 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 *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *HttpHealthChecksUpdateCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) @@ -7697,6 +8387,9 @@ func (c *HttpHealthChecksUpdateCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") urls += "?" + params.Encode() req, _ := http.NewRequest("PUT", urls, body) @@ -7774,10 +8467,21 @@ func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { 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 *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ImagesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -7854,6 +8558,14 @@ func (r *ImagesService) Deprecate(project string, image string, deprecationstatu 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 *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ImagesDeprecateCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus) @@ -7863,6 +8575,9 @@ func (c *ImagesDeprecateCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -7940,10 +8655,21 @@ func (r *ImagesService) Get(project string, image string) *ImagesGetCall { 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 *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ImagesGetCall) Do() (*Image, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -8019,6 +8745,14 @@ func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { 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 *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ImagesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.image) @@ -8028,6 +8762,9 @@ func (c *ImagesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -8121,6 +8858,14 @@ func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { 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 *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ImagesListCall) Do() (*ImageList, error) { var body io.Reader = nil params := make(url.Values) @@ -8134,6 +8879,9 @@ func (c *ImagesListCall) Do() (*ImageList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -8201,6 +8949,402 @@ func (c *ImagesListCall) Do() (*ImageList, error) { } +// method id "compute.instanceTemplates.delete": + +type InstanceTemplatesDeleteCall struct { + s *Service + project string + instanceTemplate string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified instance template resource. +func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { + c := &InstanceTemplatesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.instanceTemplate = instanceTemplate + 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 *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "instanceTemplate": c.instanceTemplate, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified instance template resource.", + // "httpMethod": "DELETE", + // "id": "compute.instanceTemplates.delete", + // "parameterOrder": [ + // "project", + // "instanceTemplate" + // ], + // "parameters": { + // "instanceTemplate": { + // "description": "Name of the instance template resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates/{instanceTemplate}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instanceTemplates.get": + +type InstanceTemplatesGetCall struct { + s *Service + project string + instanceTemplate string + opt_ map[string]interface{} +} + +// Get: Returns the specified instance template resource. +func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { + c := &InstanceTemplatesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.instanceTemplate = instanceTemplate + 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 *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesGetCall) Do() (*InstanceTemplate, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "instanceTemplate": c.instanceTemplate, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *InstanceTemplate + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified instance template resource.", + // "httpMethod": "GET", + // "id": "compute.instanceTemplates.get", + // "parameterOrder": [ + // "project", + // "instanceTemplate" + // ], + // "parameters": { + // "instanceTemplate": { + // "description": "Name of the instance template resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates/{instanceTemplate}", + // "response": { + // "$ref": "InstanceTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instanceTemplates.insert": + +type InstanceTemplatesInsertCall struct { + s *Service + project string + instancetemplate *InstanceTemplate + opt_ map[string]interface{} +} + +// Insert: Creates an instance template resource in the specified +// project using the data included in the request. +func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { + c := &InstanceTemplatesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.instancetemplate = instancetemplate + 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 *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an instance template resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.instanceTemplates.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates", + // "request": { + // "$ref": "InstanceTemplate" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instanceTemplates.list": + +type InstanceTemplatesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of instance template resources contained +// within the specified project. +func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { + c := &InstanceTemplatesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { + c.opt_["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 *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesListCall) Do() (*InstanceTemplateList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *InstanceTemplateList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of instance template resources contained within the specified project.", + // "httpMethod": "GET", + // "id": "compute.instanceTemplates.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates", + // "response": { + // "$ref": "InstanceTemplateList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.instances.addAccessConfig": type InstancesAddAccessConfigCall struct { @@ -8225,6 +9369,14 @@ func (r *InstancesService) AddAccessConfig(project string, zone string, instance 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 *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesAddAccessConfigCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) @@ -8235,6 +9387,9 @@ func (c *InstancesAddAccessConfigCall) Do() (*Operation, error) { params := make(url.Values) params.Set("alt", "json") params.Set("networkInterface", fmt.Sprintf("%v", c.networkInterface)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -8349,6 +9504,14 @@ func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggr 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 *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesAggregatedListCall) Do() (*InstanceAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -8362,6 +9525,9 @@ func (c *InstancesAggregatedListCall) Do() (*InstanceAggregatedList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -8449,6 +9615,14 @@ func (r *InstancesService) AttachDisk(project string, zone string, instance stri 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 *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesAttachDiskCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) @@ -8458,6 +9632,9 @@ func (c *InstancesAttachDiskCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -8546,10 +9723,21 @@ func (r *InstancesService) Delete(project string, zone string, instance string) 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 *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -8639,12 +9827,23 @@ func (r *InstancesService) DeleteAccessConfig(project string, zone string, insta 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 *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesDeleteAccessConfigCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") params.Set("accessConfig", fmt.Sprintf("%v", c.accessConfig)) params.Set("networkInterface", fmt.Sprintf("%v", c.networkInterface)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -8745,11 +9944,22 @@ func (r *InstancesService) DetachDisk(project string, zone string, instance stri 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 *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesDetachDiskCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") params.Set("deviceName", fmt.Sprintf("%v", c.deviceName)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -8842,10 +10052,21 @@ func (r *InstancesService) Get(project string, zone string, instance string) *In 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 *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesGetCall) Do() (*Instance, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -8932,10 +10153,21 @@ func (r *InstancesService) GetSerialPortOutput(project string, zone string, inst 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 *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesGetSerialPortOutputCall) Do() (*SerialPortOutput, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -9022,6 +10254,14 @@ func (r *InstancesService) Insert(project string, zone string, instance *Instanc 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 *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) @@ -9031,6 +10271,9 @@ func (c *InstancesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -9132,6 +10375,14 @@ func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { 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 *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesListCall) Do() (*InstanceList, error) { var body io.Reader = nil params := make(url.Values) @@ -9145,6 +10396,9 @@ func (c *InstancesListCall) Do() (*InstanceList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -9240,10 +10494,21 @@ func (r *InstancesService) Reset(project string, zone string, instance string) * 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 *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesResetCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -9333,12 +10598,23 @@ func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instan 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 *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesSetDiskAutoDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") params.Set("autoDelete", fmt.Sprintf("%v", c.autoDelete)) params.Set("deviceName", fmt.Sprintf("%v", c.deviceName)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -9441,6 +10717,14 @@ func (r *InstancesService) SetMetadata(project string, zone string, instance str 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 *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesSetMetadataCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) @@ -9450,6 +10734,9 @@ func (c *InstancesSetMetadataCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -9540,6 +10827,14 @@ func (r *InstancesService) SetScheduling(project string, zone string, instance s 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 *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesSetSchedulingCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) @@ -9549,6 +10844,9 @@ func (c *InstancesSetSchedulingCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -9640,6 +10938,14 @@ func (r *InstancesService) SetTags(project string, zone string, instance string, 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 *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *InstancesSetTagsCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) @@ -9649,6 +10955,9 @@ func (c *InstancesSetTagsCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -9735,10 +11044,21 @@ func (r *LicensesService) Get(project string, license string) *LicensesGetCall { 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 *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *LicensesGetCall) Do() (*License, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -9835,6 +11155,14 @@ func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTyp 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 *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *MachineTypesAggregatedListCall) Do() (*MachineTypeAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -9848,6 +11176,9 @@ func (c *MachineTypesAggregatedListCall) Do() (*MachineTypeAggregatedList, error if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -9934,10 +11265,21 @@ func (r *MachineTypesService) Get(project string, zone string, machineType strin 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 *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *MachineTypesGetCall) Do() (*MachineType, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -10045,6 +11387,14 @@ func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall 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 *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *MachineTypesListCall) Do() (*MachineTypeList, error) { var body io.Reader = nil params := make(url.Values) @@ -10058,6 +11408,9 @@ func (c *MachineTypesListCall) Do() (*MachineTypeList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -10151,10 +11504,21 @@ func (r *NetworksService) Delete(project string, network string) *NetworksDelete 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 *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *NetworksDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -10228,10 +11592,21 @@ func (r *NetworksService) Get(project string, network string) *NetworksGetCall { 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 *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *NetworksGetCall) Do() (*Network, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -10307,6 +11682,14 @@ func (r *NetworksService) Insert(project string, network *Network) *NetworksInse 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 *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *NetworksInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) @@ -10316,6 +11699,9 @@ func (c *NetworksInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -10406,6 +11792,14 @@ func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { 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 *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *NetworksListCall) Do() (*NetworkList, error) { var body io.Reader = nil params := make(url.Values) @@ -10419,6 +11813,9 @@ func (c *NetworksListCall) Do() (*NetworkList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -10501,10 +11898,21 @@ func (r *ProjectsService) Get(project string) *ProjectsGetCall { 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 *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ProjectsGetCall) Do() (*Project, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -10571,6 +11979,14 @@ func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Me 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 *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ProjectsSetCommonInstanceMetadataCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) @@ -10580,6 +11996,9 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -10648,6 +12067,14 @@ func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocati 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 *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ProjectsSetUsageExportBucketCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation) @@ -10657,6 +12084,9 @@ func (c *ProjectsSetUsageExportBucketCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -10730,10 +12160,21 @@ func (r *RegionOperationsService) Delete(project string, region string, operatio 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 *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RegionOperationsDeleteCall) Do() error { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -10811,10 +12252,21 @@ func (r *RegionOperationsService) Get(project string, region string, operation s 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 *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RegionOperationsGetCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -10922,6 +12374,14 @@ func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperations 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 *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RegionOperationsListCall) Do() (*OperationList, error) { var body io.Reader = nil params := make(url.Values) @@ -10935,6 +12395,9 @@ func (c *RegionOperationsListCall) Do() (*OperationList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -11028,10 +12491,21 @@ func (r *RegionsService) Get(project string, region string) *RegionsGetCall { 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 *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RegionsGetCall) Do() (*Region, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -11128,6 +12602,14 @@ func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { 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 *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RegionsListCall) Do() (*RegionList, error) { var body io.Reader = nil params := make(url.Values) @@ -11141,6 +12623,9 @@ func (c *RegionsListCall) Do() (*RegionList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -11225,10 +12710,21 @@ func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { 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 *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RoutesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -11302,10 +12798,21 @@ func (r *RoutesService) Get(project string, route string) *RoutesGetCall { 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 *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RoutesGetCall) Do() (*Route, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -11381,6 +12888,14 @@ func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { 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 *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RoutesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.route) @@ -11390,6 +12905,9 @@ func (c *RoutesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -11480,6 +12998,14 @@ func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { 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 *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *RoutesListCall) Do() (*RouteList, error) { var body io.Reader = nil params := make(url.Values) @@ -11493,6 +13019,9 @@ func (c *RoutesListCall) Do() (*RouteList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -11577,10 +13106,21 @@ func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDel 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 *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *SnapshotsDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -11654,10 +13194,21 @@ func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCal 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 *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *SnapshotsGetCall) Do() (*Snapshot, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -11754,6 +13305,14 @@ func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { 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 *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *SnapshotsListCall) Do() (*SnapshotList, error) { var body io.Reader = nil params := make(url.Values) @@ -11767,6 +13326,9 @@ func (c *SnapshotsListCall) Do() (*SnapshotList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -11851,10 +13413,21 @@ func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string 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 *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetHttpProxiesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -11928,10 +13501,21 @@ func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) * 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 *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetHttpProxiesGetCall) Do() (*TargetHttpProxy, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -12007,6 +13591,14 @@ func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *Targe 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 *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetHttpProxiesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy) @@ -12016,6 +13608,9 @@ func (c *TargetHttpProxiesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -12106,6 +13701,14 @@ func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxi 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 *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetHttpProxiesListCall) Do() (*TargetHttpProxyList, error) { var body io.Reader = nil params := make(url.Values) @@ -12119,6 +13722,9 @@ func (c *TargetHttpProxiesListCall) Do() (*TargetHttpProxyList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -12205,6 +13811,14 @@ func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy str 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 *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetHttpProxiesSetUrlMapCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) @@ -12214,6 +13828,9 @@ func (c *TargetHttpProxiesSetUrlMapCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -12313,6 +13930,14 @@ func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetI 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 *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetInstancesAggregatedListCall) Do() (*TargetInstanceAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -12326,6 +13951,9 @@ func (c *TargetInstancesAggregatedListCall) Do() (*TargetInstanceAggregatedList, if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -12412,10 +14040,21 @@ func (r *TargetInstancesService) Delete(project string, zone string, targetInsta 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 *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetInstancesDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -12500,10 +14139,21 @@ func (r *TargetInstancesService) Get(project string, zone string, targetInstance 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 *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetInstancesGetCall) Do() (*TargetInstance, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -12590,6 +14240,14 @@ func (r *TargetInstancesService) Insert(project string, zone string, targetinsta 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 *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetInstancesInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance) @@ -12599,6 +14257,9 @@ func (c *TargetInstancesInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -12700,6 +14361,14 @@ func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesLi 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 *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetInstancesListCall) Do() (*TargetInstanceList, error) { var body io.Reader = nil params := make(url.Values) @@ -12713,6 +14382,9 @@ func (c *TargetInstancesListCall) Do() (*TargetInstanceList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -12810,6 +14482,14 @@ func (r *TargetPoolsService) AddHealthCheck(project string, region string, targe 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 *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsAddHealthCheckCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest) @@ -12819,6 +14499,9 @@ func (c *TargetPoolsAddHealthCheckCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -12908,6 +14591,14 @@ func (r *TargetPoolsService) AddInstance(project string, region string, targetPo 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 *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsAddInstanceCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest) @@ -12917,6 +14608,9 @@ func (c *TargetPoolsAddInstanceCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -13023,6 +14717,14 @@ func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPools 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 *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsAggregatedListCall) Do() (*TargetPoolAggregatedList, error) { var body io.Reader = nil params := make(url.Values) @@ -13036,6 +14738,9 @@ func (c *TargetPoolsAggregatedListCall) Do() (*TargetPoolAggregatedList, error) if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -13122,10 +14827,21 @@ func (r *TargetPoolsService) Delete(project string, region string, targetPool st 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 *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -13210,10 +14926,21 @@ func (r *TargetPoolsService) Get(project string, region string, targetPool strin 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 *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsGetCall) Do() (*TargetPool, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -13302,6 +15029,14 @@ func (r *TargetPoolsService) GetHealth(project string, region string, targetPool 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 *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsGetHealthCall) Do() (*TargetPoolInstanceHealth, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference) @@ -13311,6 +15046,9 @@ func (c *TargetPoolsGetHealthCall) Do() (*TargetPoolInstanceHealth, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -13400,6 +15138,14 @@ func (r *TargetPoolsService) Insert(project string, region string, targetpool *T 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 *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool) @@ -13409,6 +15155,9 @@ func (c *TargetPoolsInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -13510,6 +15259,14 @@ func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { 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 *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsListCall) Do() (*TargetPoolList, error) { var body io.Reader = nil params := make(url.Values) @@ -13523,6 +15280,9 @@ func (c *TargetPoolsListCall) Do() (*TargetPoolList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -13620,6 +15380,14 @@ func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, ta 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 *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsRemoveHealthCheckCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest) @@ -13629,6 +15397,9 @@ func (c *TargetPoolsRemoveHealthCheckCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -13718,6 +15489,14 @@ func (r *TargetPoolsService) RemoveInstance(project string, region string, targe 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 *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsRemoveInstanceCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest) @@ -13727,6 +15506,9 @@ func (c *TargetPoolsRemoveInstanceCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -13823,6 +15605,14 @@ func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetP 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 *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *TargetPoolsSetBackupCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) @@ -13835,6 +15625,9 @@ func (c *TargetPoolsSetBackupCall) Do() (*Operation, error) { if v, ok := c.opt_["failoverRatio"]; ok { params.Set("failoverRatio", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -13927,10 +15720,21 @@ func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCal 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 *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *UrlMapsDeleteCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -14004,10 +15808,21 @@ func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { 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 *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *UrlMapsGetCall) Do() (*UrlMap, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -14083,6 +15898,14 @@ func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCa 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 *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *UrlMapsInsertCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) @@ -14092,6 +15915,9 @@ func (c *UrlMapsInsertCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -14182,6 +16008,14 @@ func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { 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 *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *UrlMapsListCall) Do() (*UrlMapList, error) { var body io.Reader = nil params := make(url.Values) @@ -14195,6 +16029,9 @@ func (c *UrlMapsListCall) Do() (*UrlMapList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -14282,6 +16119,14 @@ func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *U 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 *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *UrlMapsPatchCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) @@ -14291,6 +16136,9 @@ func (c *UrlMapsPatchCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + params.Encode() req, _ := http.NewRequest("PATCH", urls, body) @@ -14370,6 +16218,14 @@ func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) * 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 *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *UrlMapsUpdateCall) Do() (*Operation, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) @@ -14379,6 +16235,9 @@ func (c *UrlMapsUpdateCall) Do() (*Operation, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") urls += "?" + params.Encode() req, _ := http.NewRequest("PUT", urls, body) @@ -14460,6 +16319,14 @@ func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidate 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 *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *UrlMapsValidateCall) Do() (*UrlMapsValidateResponse, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest) @@ -14469,6 +16336,9 @@ func (c *UrlMapsValidateCall) Do() (*UrlMapsValidateResponse, error) { ctype := "application/json" params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) @@ -14548,10 +16418,21 @@ func (r *ZoneOperationsService) Delete(project string, zone string, operation st 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 *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ZoneOperationsDeleteCall) Do() error { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) @@ -14629,10 +16510,21 @@ func (r *ZoneOperationsService) Get(project string, zone string, operation strin 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 *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ZoneOperationsGetCall) Do() (*Operation, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -14740,6 +16632,14 @@ func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsList 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 *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ZoneOperationsListCall) Do() (*OperationList, error) { var body io.Reader = nil params := make(url.Values) @@ -14753,6 +16653,9 @@ func (c *ZoneOperationsListCall) Do() (*OperationList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -14846,10 +16749,21 @@ func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { 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 *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ZonesGetCall) Do() (*Zone, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) @@ -14946,6 +16860,14 @@ func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { 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 *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + func (c *ZonesListCall) Do() (*ZoneList, error) { var body io.Reader = nil params := make(url.Values) @@ -14959,6 +16881,9 @@ func (c *ZonesListCall) Do() (*ZoneList, error) { if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/container-api.json b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/container-api.json new file mode 100644 index 00000000000..bca5a313cfe --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/container-api.json @@ -0,0 +1,579 @@ +{ + "kind": "discovery#restDescription", + "etag": "\"l66ggWbucbkBw9Lpos72oziyefE/ZrZBeDfQYPqAxFURJt0IhCOLUHQ\"", + "discoveryVersion": "v1", + "id": "container:v1beta1", + "name": "container", + "version": "v1beta1", + "revision": "20141103", + "title": "Google Container Engine API", + "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", + "ownerDomain": "google.com", + "ownerName": "Google", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "baseUrl": "https://www.googleapis.com/container/v1beta1/projects/", + "basePath": "/container/v1beta1/projects/", + "rootUrl": "https://www.googleapis.com/", + "servicePath": "container/v1beta1/projects/", + "batchPath": "batch", + "parameters": { + "alt": { + "type": "string", + "description": "Data format for the response.", + "default": "json", + "enum": [ + "json" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json" + ], + "location": "query" + }, + "fields": { + "type": "string", + "description": "Selector specifying which fields to include in a partial response.", + "location": "query" + }, + "key": { + "type": "string", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query" + }, + "oauth_token": { + "type": "string", + "description": "OAuth 2.0 token for the current user.", + "location": "query" + }, + "prettyPrint": { + "type": "boolean", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "location": "query" + }, + "quotaUser": { + "type": "string", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", + "location": "query" + }, + "userIp": { + "type": "string", + "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", + "location": "query" + } + }, + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "schemas": { + "Cluster": { + "id": "Cluster", + "type": "object", + "externalTypeName": "container.v1beta1.Cluster", + "properties": { + "clusterApiVersion": { + "type": "string", + "description": "The API version of the Kubernetes master and kubelets running in this cluster. Allowed value is 0.4.2, or leave blank to pick up the latest stable release." + }, + "containerIpv4Cidr": { + "type": "string", + "description": "[Output only] The IP addresses of the container pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29)." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output only] The time the cluster was created, in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this cluster." + }, + "endpoint": { + "type": "string", + "description": "[Output only] The IP address of this cluster's Kubernetes master. The endpoint can be accessed from the internet at https://username:password@endpoint/.\n\nSee the masterAuth property of this resource for username and password information." + }, + "masterAuth": { + "$ref": "MasterAuth", + "description": "The HTTP basic authentication information for accessing the master. Because the master endpoint is open to the internet, you should create a strong password." + }, + "name": { + "type": "string", + "description": "The name of this cluster. The name must be unique within this project and zone, and can be up to 40 characters with the following restrictions: \n- Lowercase letters, numbers, and hyphens only.\n- Must start with a letter.\n- Must end with a number or a letter." + }, + "nodeConfig": { + "$ref": "NodeConfig", + "description": "The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig." + }, + "nodeRoutingPrefixSize": { + "type": "integer", + "description": "[Output only] The size of the address space on each node for hosting containers.", + "format": "int32" + }, + "numNodes": { + "type": "integer", + "description": "The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances plus one (to include the master). You must also have available firewall and routes quota.", + "format": "int32" + }, + "servicesIpv4Cidr": { + "type": "string", + "description": "[Output only] The IP addresses of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the 10.0.0.0/16 range." + }, + "status": { + "type": "string", + "description": "[Output only] The current status of this cluster.", + "enum": [ + "error", + "provisioning", + "running", + "stopping" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "statusMessage": { + "type": "string", + "description": "[Output only] Additional information about the current status of this cluster, if available." + }, + "zone": { + "type": "string", + "description": "[Output only] The name of the Google Compute Engine zone in which the cluster resides." + } + } + }, + "CreateClusterRequest": { + "id": "CreateClusterRequest", + "type": "object", + "externalTypeName": "container.v1beta1.CreateClusterRequest", + "properties": { + "cluster": { + "$ref": "Cluster", + "description": "A cluster resource." + } + } + }, + "ListAggregatedClustersResponse": { + "id": "ListAggregatedClustersResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListAggregatedClustersResponse", + "properties": { + "clusters": { + "type": "array", + "description": "A list of clusters in the project, across all zones.", + "items": { + "$ref": "Cluster" + } + } + } + }, + "ListAggregatedOperationsResponse": { + "id": "ListAggregatedOperationsResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListAggregatedOperationsResponse", + "properties": { + "operations": { + "type": "array", + "description": "A list of operations in the project, across all zones.", + "items": { + "$ref": "Operation" + } + } + } + }, + "ListClustersResponse": { + "id": "ListClustersResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListClustersResponse", + "properties": { + "clusters": { + "type": "array", + "description": "A list of clusters in the project in the specified zone.", + "items": { + "$ref": "Cluster" + } + } + } + }, + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListOperationsResponse", + "properties": { + "operations": { + "type": "array", + "description": "A list of operations in the project in the specified zone.", + "items": { + "$ref": "Operation" + } + } + } + }, + "MasterAuth": { + "id": "MasterAuth", + "type": "object", + "externalTypeName": "container.v1beta1.MasterAuth", + "properties": { + "password": { + "type": "string", + "description": "The password to use when accessing the Kubernetes master endpoint." + }, + "user": { + "type": "string", + "description": "The username to use when accessing the Kubernetes master endpoint." + } + } + }, + "NodeConfig": { + "id": "NodeConfig", + "type": "object", + "externalTypeName": "container.v1beta1.NodeConfig", + "properties": { + "machineType": { + "type": "string", + "description": "The name of a Google Compute Engine machine type (e.g. n1-standard-1).\n\nIf unspecified, the default machine type is n1-standard-1." + }, + "sourceImage": { + "type": "string", + "description": "The fully-specified name of a Google Compute Engine image. For example: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).\n\nIf specifying an image, you are responsible for ensuring its compatibility with the Debian 7 backports image. We recommend leaving this field blank to accept the default backports-debian-7-wheezy value." + } + } + }, + "Operation": { + "id": "Operation", + "type": "object", + "description": "Defines the operation resource. All fields are output only.", + "externalTypeName": "container.v1beta1.Operation", + "properties": { + "errorMessage": { + "type": "string", + "description": "If an error has occurred, a textual description of the error." + }, + "name": { + "type": "string", + "description": "The server-assigned ID for this operation. If the operation is fulfilled upfront, it may not have a resource name." + }, + "operationType": { + "type": "string", + "description": "The operation type.", + "enum": [ + "createCluster", + "deleteCluster" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "status": { + "type": "string", + "description": "The current status of the operation.", + "enum": [ + "done", + "pending", + "running" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, + "target": { + "type": "string", + "description": "[Optional] The URL of the cluster resource that this operation is associated with." + }, + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the operation is taking place." + } + } + } + }, + "resources": { + "projects": { + "resources": { + "clusters": { + "methods": { + "list": { + "id": "container.projects.clusters.list", + "path": "{projectId}/clusters", + "httpMethod": "GET", + "description": "Lists all clusters owned by a project across all zones.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListAggregatedClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "list": { + "id": "container.projects.operations.list", + "path": "{projectId}/operations", + "httpMethod": "GET", + "description": "Lists all operations in a project, across all zones.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListAggregatedOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "zones": { + "resources": { + "clusters": { + "methods": { + "create": { + "id": "container.projects.zones.clusters.create", + "path": "{projectId}/zones/{zoneId}/clusters", + "httpMethod": "POST", + "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master instance.\n\nThe cluster is created in the project's default network.\n\nA firewall is added that allows traffic into port 443 on the master, which enables HTTPS. A firewall and a route is added for each node to allow the containers on that node to communicate with all other instances in the cluster.\n\nFinally, a route named k8s-iproute-10-xx-0-0 is created to track that the cluster's 10.xx.0.0/16 CIDR has been assigned.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId" + ], + "request": { + "$ref": "CreateClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "id": "container.projects.zones.clusters.delete", + "path": "{projectId}/zones/{zoneId}/clusters/{clusterId}", + "httpMethod": "DELETE", + "description": "Deletes the cluster, including the Kubernetes master and all worker nodes.\n\nFirewalls and routes that were configured at cluster creation are also deleted.", + "parameters": { + "clusterId": { + "type": "string", + "description": "The name of the cluster to delete.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "id": "container.projects.zones.clusters.get", + "path": "{projectId}/zones/{zoneId}/clusters/{clusterId}", + "httpMethod": "GET", + "description": "Gets a specific cluster.", + "parameters": { + "clusterId": { + "type": "string", + "description": "The name of the cluster to retrieve.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId", + "clusterId" + ], + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "id": "container.projects.zones.clusters.list", + "path": "{projectId}/zones/{zoneId}/clusters", + "httpMethod": "GET", + "description": "Lists all clusters owned by a project in the specified zone.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId" + ], + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "get": { + "id": "container.projects.zones.operations.get", + "path": "{projectId}/zones/{zoneId}/operations/{operationId}", + "httpMethod": "GET", + "description": "Gets the specified operation.", + "parameters": { + "operationId": { + "type": "string", + "description": "The server-assigned name of the operation.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId", + "operationId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "id": "container.projects.zones.operations.list", + "path": "{projectId}/zones/{zoneId}/operations", + "httpMethod": "GET", + "description": "Lists all operations in a project in a specific zone.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone to return operations for.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } +} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/container-gen.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/container-gen.go new file mode 100644 index 00000000000..c9fce64414b --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/container-gen.go @@ -0,0 +1,1007 @@ +// Package container provides access to the Google Container Engine API. +// +// Usage example: +// +// import "code.google.com/p/google-api-go-client/container/v1beta1" +// ... +// containerService, err := container.New(oauthHttpClient) +package container + +import ( + "bytes" + "code.google.com/p/google-api-go-client/googleapi" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace + +const apiId = "container:v1beta1" +const apiName = "container" +const apiVersion = "v1beta1" +const basePath = "https://www.googleapis.com/container/v1beta1/projects/" + +// OAuth2 scopes used by this API. +const ( + // View and manage your data across Google Cloud Platform services + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + + Projects *ProjectsService +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Clusters = NewProjectsClustersService(s) + rs.Operations = NewProjectsOperationsService(s) + rs.Zones = NewProjectsZonesService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Clusters *ProjectsClustersService + + Operations *ProjectsOperationsService + + Zones *ProjectsZonesService +} + +func NewProjectsClustersService(s *Service) *ProjectsClustersService { + rs := &ProjectsClustersService{s: s} + return rs +} + +type ProjectsClustersService struct { + s *Service +} + +func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { + rs := &ProjectsOperationsService{s: s} + return rs +} + +type ProjectsOperationsService struct { + s *Service +} + +func NewProjectsZonesService(s *Service) *ProjectsZonesService { + rs := &ProjectsZonesService{s: s} + rs.Clusters = NewProjectsZonesClustersService(s) + rs.Operations = NewProjectsZonesOperationsService(s) + return rs +} + +type ProjectsZonesService struct { + s *Service + + Clusters *ProjectsZonesClustersService + + Operations *ProjectsZonesOperationsService +} + +func NewProjectsZonesClustersService(s *Service) *ProjectsZonesClustersService { + rs := &ProjectsZonesClustersService{s: s} + return rs +} + +type ProjectsZonesClustersService struct { + s *Service +} + +func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { + rs := &ProjectsZonesOperationsService{s: s} + return rs +} + +type ProjectsZonesOperationsService struct { + s *Service +} + +type Cluster struct { + // ClusterApiVersion: The API version of the Kubernetes master and + // kubelets running in this cluster. Allowed value is 0.4.2, or leave + // blank to pick up the latest stable release. + ClusterApiVersion string `json:"clusterApiVersion,omitempty"` + + // ContainerIpv4Cidr: [Output only] The IP addresses of the container + // pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29). + ContainerIpv4Cidr string `json:"containerIpv4Cidr,omitempty"` + + // CreationTimestamp: [Output only] The time the cluster was created, in + // RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this cluster. + Description string `json:"description,omitempty"` + + // Endpoint: [Output only] The IP address of this cluster's Kubernetes + // master. The endpoint can be accessed from the internet at + // https://username:password@endpoint/. + // + // See the masterAuth property of + // this resource for username and password information. + Endpoint string `json:"endpoint,omitempty"` + + // MasterAuth: The HTTP basic authentication information for accessing + // the master. Because the master endpoint is open to the internet, you + // should create a strong password. + MasterAuth *MasterAuth `json:"masterAuth,omitempty"` + + // Name: The name of this cluster. The name must be unique within this + // project and zone, and can be up to 40 characters with the following + // restrictions: + // - Lowercase letters, numbers, and hyphens only. + // - + // Must start with a letter. + // - Must end with a number or a letter. + Name string `json:"name,omitempty"` + + // NodeConfig: The machine type and image to use for all nodes in this + // cluster. See the descriptions of the child properties of nodeConfig. + NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` + + // NodeRoutingPrefixSize: [Output only] The size of the address space on + // each node for hosting containers. + NodeRoutingPrefixSize int64 `json:"nodeRoutingPrefixSize,omitempty"` + + // NumNodes: The number of nodes to create in this cluster. You must + // ensure that your Compute Engine resource quota is sufficient for this + // number of instances plus one (to include the master). You must also + // have available firewall and routes quota. + NumNodes int64 `json:"numNodes,omitempty"` + + // ServicesIpv4Cidr: [Output only] The IP addresses of the Kubernetes + // services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). + // Service addresses are always in the 10.0.0.0/16 range. + ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` + + // Status: [Output only] The current status of this cluster. + Status string `json:"status,omitempty"` + + // StatusMessage: [Output only] Additional information about the current + // status of this cluster, if available. + StatusMessage string `json:"statusMessage,omitempty"` + + // Zone: [Output only] The name of the Google Compute Engine zone in + // which the cluster resides. + Zone string `json:"zone,omitempty"` +} + +type CreateClusterRequest struct { + // Cluster: A cluster resource. + Cluster *Cluster `json:"cluster,omitempty"` +} + +type ListAggregatedClustersResponse struct { + // Clusters: A list of clusters in the project, across all zones. + Clusters []*Cluster `json:"clusters,omitempty"` +} + +type ListAggregatedOperationsResponse struct { + // Operations: A list of operations in the project, across all zones. + Operations []*Operation `json:"operations,omitempty"` +} + +type ListClustersResponse struct { + // Clusters: A list of clusters in the project in the specified zone. + Clusters []*Cluster `json:"clusters,omitempty"` +} + +type ListOperationsResponse struct { + // Operations: A list of operations in the project in the specified + // zone. + Operations []*Operation `json:"operations,omitempty"` +} + +type MasterAuth struct { + // Password: The password to use when accessing the Kubernetes master + // endpoint. + Password string `json:"password,omitempty"` + + // User: The username to use when accessing the Kubernetes master + // endpoint. + User string `json:"user,omitempty"` +} + +type NodeConfig struct { + // MachineType: The name of a Google Compute Engine machine type (e.g. + // n1-standard-1). + // + // If unspecified, the default machine type is + // n1-standard-1. + MachineType string `json:"machineType,omitempty"` + + // SourceImage: The fully-specified name of a Google Compute Engine + // image. For example: + // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/ima + // ges/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version + // date). + // + // If specifying an image, you are responsible for ensuring its + // compatibility with the Debian 7 backports image. We recommend leaving + // this field blank to accept the default backports-debian-7-wheezy + // value. + SourceImage string `json:"sourceImage,omitempty"` +} + +type Operation struct { + // ErrorMessage: If an error has occurred, a textual description of the + // error. + ErrorMessage string `json:"errorMessage,omitempty"` + + // Name: The server-assigned ID for this operation. If the operation is + // fulfilled upfront, it may not have a resource name. + Name string `json:"name,omitempty"` + + // OperationType: The operation type. + OperationType string `json:"operationType,omitempty"` + + // Status: The current status of the operation. + Status string `json:"status,omitempty"` + + // Target: [Optional] The URL of the cluster resource that this + // operation is associated with. + Target string `json:"target,omitempty"` + + // Zone: The name of the Google Compute Engine zone in which the + // operation is taking place. + Zone string `json:"zone,omitempty"` +} + +// method id "container.projects.clusters.list": + +type ProjectsClustersListCall struct { + s *Service + projectId string + opt_ map[string]interface{} +} + +// List: Lists all clusters owned by a project across all zones. +func (r *ProjectsClustersService) List(projectId string) *ProjectsClustersListCall { + c := &ProjectsClustersListCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + 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 *ProjectsClustersListCall) Fields(s ...googleapi.Field) *ProjectsClustersListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsClustersListCall) Do() (*ListAggregatedClustersResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/clusters") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListAggregatedClustersResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all clusters owned by a project across all zones.", + // "httpMethod": "GET", + // "id": "container.projects.clusters.list", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/clusters", + // "response": { + // "$ref": "ListAggregatedClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.operations.list": + +type ProjectsOperationsListCall struct { + s *Service + projectId string + opt_ map[string]interface{} +} + +// List: Lists all operations in a project, across all zones. +func (r *ProjectsOperationsService) List(projectId string) *ProjectsOperationsListCall { + c := &ProjectsOperationsListCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + 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 *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsOperationsListCall) Do() (*ListAggregatedOperationsResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListAggregatedOperationsResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all operations in a project, across all zones.", + // "httpMethod": "GET", + // "id": "container.projects.operations.list", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/operations", + // "response": { + // "$ref": "ListAggregatedOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.create": + +type ProjectsZonesClustersCreateCall struct { + s *Service + projectId string + zoneId string + createclusterrequest *CreateClusterRequest + opt_ map[string]interface{} +} + +// Create: Creates a cluster, consisting of the specified number and +// type of Google Compute Engine instances, plus a Kubernetes master +// instance. +// +// The cluster is created in the project's default +// network. +// +// A firewall is added that allows traffic into port 443 on +// the master, which enables HTTPS. A firewall and a route is added for +// each node to allow the containers on that node to communicate with +// all other instances in the cluster. +// +// Finally, a route named +// k8s-iproute-10-xx-0-0 is created to track that the cluster's +// 10.xx.0.0/16 CIDR has been assigned. +func (r *ProjectsZonesClustersService) Create(projectId string, zoneId string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { + c := &ProjectsZonesClustersCreateCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + c.createclusterrequest = createclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersCreateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersCreateCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master instance.\n\nThe cluster is created in the project's default network.\n\nA firewall is added that allows traffic into port 443 on the master, which enables HTTPS. A firewall and a route is added for each node to allow the containers on that node to communicate with all other instances in the cluster.\n\nFinally, a route named k8s-iproute-10-xx-0-0 is created to track that the cluster's 10.xx.0.0/16 CIDR has been assigned.", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.create", + // "parameterOrder": [ + // "projectId", + // "zoneId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/clusters", + // "request": { + // "$ref": "CreateClusterRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.delete": + +type ProjectsZonesClustersDeleteCall struct { + s *Service + projectId string + zoneId string + clusterId string + opt_ map[string]interface{} +} + +// Delete: Deletes the cluster, including the Kubernetes master and all +// worker nodes. +// +// Firewalls and routes that were configured at cluster +// creation are also deleted. +func (r *ProjectsZonesClustersService) Delete(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersDeleteCall { + c := &ProjectsZonesClustersDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + c.clusterId = clusterId + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters/{clusterId}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + "clusterId": c.clusterId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the cluster, including the Kubernetes master and all worker nodes.\n\nFirewalls and routes that were configured at cluster creation are also deleted.", + // "httpMethod": "DELETE", + // "id": "container.projects.zones.clusters.delete", + // "parameterOrder": [ + // "projectId", + // "zoneId", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/clusters/{clusterId}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.get": + +type ProjectsZonesClustersGetCall struct { + s *Service + projectId string + zoneId string + clusterId string + opt_ map[string]interface{} +} + +// Get: Gets a specific cluster. +func (r *ProjectsZonesClustersService) Get(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersGetCall { + c := &ProjectsZonesClustersGetCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + c.clusterId = clusterId + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersGetCall) Do() (*Cluster, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters/{clusterId}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + "clusterId": c.clusterId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Cluster + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a specific cluster.", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.get", + // "parameterOrder": [ + // "projectId", + // "zoneId", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to retrieve.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/clusters/{clusterId}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.list": + +type ProjectsZonesClustersListCall struct { + s *Service + projectId string + zoneId string + opt_ map[string]interface{} +} + +// List: Lists all clusters owned by a project in the specified zone. +func (r *ProjectsZonesClustersService) List(projectId string, zoneId string) *ProjectsZonesClustersListCall { + c := &ProjectsZonesClustersListCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + 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 *ProjectsZonesClustersListCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersListCall) Do() (*ListClustersResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListClustersResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all clusters owned by a project in the specified zone.", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.list", + // "parameterOrder": [ + // "projectId", + // "zoneId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.operations.get": + +type ProjectsZonesOperationsGetCall struct { + s *Service + projectId string + zoneId string + operationId string + opt_ map[string]interface{} +} + +// Get: Gets the specified operation. +func (r *ProjectsZonesOperationsService) Get(projectId string, zoneId string, operationId string) *ProjectsZonesOperationsGetCall { + c := &ProjectsZonesOperationsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + c.operationId = operationId + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsZonesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesOperationsGetCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/operations/{operationId}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + "operationId": c.operationId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified operation.", + // "httpMethod": "GET", + // "id": "container.projects.zones.operations.get", + // "parameterOrder": [ + // "projectId", + // "zoneId", + // "operationId" + // ], + // "parameters": { + // "operationId": { + // "description": "The server-assigned name of the operation.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/operations/{operationId}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.operations.list": + +type ProjectsZonesOperationsListCall struct { + s *Service + projectId string + zoneId string + opt_ map[string]interface{} +} + +// List: Lists all operations in a project in a specific zone. +func (r *ProjectsZonesOperationsService) List(projectId string, zoneId string) *ProjectsZonesOperationsListCall { + c := &ProjectsZonesOperationsListCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + 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 *ProjectsZonesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsZonesOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesOperationsListCall) Do() (*ListOperationsResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListOperationsResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all operations in a project in a specific zone.", + // "httpMethod": "GET", + // "id": "container.projects.zones.operations.list", + // "parameterOrder": [ + // "projectId", + // "zoneId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone to return operations for.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi.go index c3a1e80fa34..d6e5cd83fbf 100644 --- a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi.go +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi.go @@ -17,8 +17,9 @@ import ( "net/textproto" "net/url" "os" - "regexp" "strings" + + "code.google.com/p/google-api-go-client/googleapi/internal/uritemplates" ) // ContentTyper is an interface for Readers which know (or would like @@ -310,27 +311,16 @@ func SetOpaque(u *url.URL) { } } -// Find {encoded} strings -var findEncodedStrings = regexp.MustCompile(`(\{[A-Za-z_]+\})`) - // Expand subsitutes any {encoded} strings in the URL passed in using // the map supplied. // // This calls SetOpaque to avoid encoding of the parameters in the URL path. func Expand(u *url.URL, expansions map[string]string) { - u.Path = findEncodedStrings.ReplaceAllStringFunc(u.Path, func(replace string) string { - argument := replace[1 : len(replace)-1] - value, ok := expansions[argument] - if !ok { - // Expansion not found - leave unchanged - return replace - } - // Would like to call url.escape(value, encodePath) here - encodedValue := url.QueryEscape(value) - encodedValue = strings.Replace(encodedValue, "+", "%20", -1) - return encodedValue - }) - SetOpaque(u) + expanded, err := uritemplates.Expand(u.Path, expansions) + if err == nil { + u.Path = expanded + SetOpaque(u) + } } // CloseBody is used to close res.Body. @@ -375,3 +365,37 @@ func ConvertVariant(v map[string]interface{}, dst interface{}) bool { } return json.Unmarshal(buf.Bytes(), dst) == nil } + +// A Field names a field to be retrieved with a partial response. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// +// Partial responses can dramatically reduce the amount of data that must be sent to your application. +// In order to request partial responses, you can specify the full list of fields +// that your application needs by adding the Fields option to your request. +// +// Field strings use camelCase with leading lower-case characters to identify fields within the response. +// +// For example, if your response has a "NextPageToken" and a slice of "Items" with "Id" fields, +// you could request just those fields like this: +// +// svc.Events.List().Fields("nextPageToken", "items/id").Do() +// +// or if you were also interested in each Item's "Updated" field, you can combine them like this: +// +// svc.Events.List().Fields("nextPageToken", "items(id,updated)").Do() +// +// More information about field formatting can be found here: +// https://developers.google.com/+/api/#fields-syntax +// +// Another way to find field names is through the Google API explorer: +// https://developers.google.com/apis-explorer/#p/ +type Field string + +// CombineFields combines fields into a single string. +func CombineFields(s []Field) string { + r := make([]string, len(s)) + for i, v := range s { + r[i] = string(v) + } + return strings.Join(r, ",") +} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi_test.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi_test.go index d94e6c056a9..abc51850613 100644 --- a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi_test.go +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/googleapi_test.go @@ -146,7 +146,7 @@ var expandTests = []ExpandTest{ map[string]string{ "bucket": "red or blue", }, - "http://www.golang.org/{object}/delete", + "http://www.golang.org//delete", }, // multiple expansions { @@ -182,6 +182,16 @@ var expandTests = []ExpandTest{ }, "http://www.golang.org/{bucket/get", }, + // "+" prefix for suppressing escape + // See also: http://tools.ietf.org/html/rfc6570#section-3.2.3 + { + "http://www.golang.org/{+topic}", + map[string]string{ + "topic": "/topics/myproject/mytopic", + }, + // The double slashes here look weird, but it's intentional + "http://www.golang.org//topics/myproject/mytopic", + }, } func TestExpand(t *testing.T) { diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 00000000000..de9c88cb65c --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/uritemplates.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/uritemplates.go new file mode 100644 index 00000000000..8a84813fe52 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/uritemplates.go @@ -0,0 +1,359 @@ +// Copyright 2013 Joshua Tacoma. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package uritemplates is a level 4 implementation of RFC 6570 (URI +// Template, http://tools.ietf.org/html/rfc6570). +// +// To use uritemplates, parse a template string and expand it with a value +// map: +// +// template, _ := uritemplates.Parse("https://api.github.com/repos{/user,repo}") +// values := make(map[string]interface{}) +// values["user"] = "jtacoma" +// values["repo"] = "uritemplates" +// expanded, _ := template.ExpandString(values) +// fmt.Printf(expanded) +// +package uritemplates + +import ( + "bytes" + "errors" + "fmt" + "reflect" + "regexp" + "strconv" + "strings" +) + +var ( + unreserved = regexp.MustCompile("[^A-Za-z0-9\\-._~]") + reserved = regexp.MustCompile("[^A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=]") + validname = regexp.MustCompile("^([A-Za-z0-9_\\.]|%[0-9A-Fa-f][0-9A-Fa-f])+$") + hex = []byte("0123456789ABCDEF") +) + +func pctEncode(src []byte) []byte { + dst := make([]byte, len(src)*3) + for i, b := range src { + buf := dst[i*3 : i*3+3] + buf[0] = 0x25 + buf[1] = hex[b/16] + buf[2] = hex[b%16] + } + return dst +} + +func escape(s string, allowReserved bool) (escaped string) { + if allowReserved { + escaped = string(reserved.ReplaceAllFunc([]byte(s), pctEncode)) + } else { + escaped = string(unreserved.ReplaceAllFunc([]byte(s), pctEncode)) + } + return escaped +} + +// A UriTemplate is a parsed representation of a URI template. +type UriTemplate struct { + raw string + parts []templatePart +} + +// Parse parses a URI template string into a UriTemplate object. +func Parse(rawtemplate string) (template *UriTemplate, err error) { + template = new(UriTemplate) + template.raw = rawtemplate + split := strings.Split(rawtemplate, "{") + template.parts = make([]templatePart, len(split)*2-1) + for i, s := range split { + if i == 0 { + if strings.Contains(s, "}") { + err = errors.New("unexpected }") + break + } + template.parts[i].raw = s + } else { + subsplit := strings.Split(s, "}") + if len(subsplit) != 2 { + err = errors.New("malformed template") + break + } + expression := subsplit[0] + template.parts[i*2-1], err = parseExpression(expression) + if err != nil { + break + } + template.parts[i*2].raw = subsplit[1] + } + } + if err != nil { + template = nil + } + return template, err +} + +type templatePart struct { + raw string + terms []templateTerm + first string + sep string + named bool + ifemp string + allowReserved bool +} + +type templateTerm struct { + name string + explode bool + truncate int +} + +func parseExpression(expression string) (result templatePart, err error) { + switch expression[0] { + case '+': + result.sep = "," + result.allowReserved = true + expression = expression[1:] + case '.': + result.first = "." + result.sep = "." + expression = expression[1:] + case '/': + result.first = "/" + result.sep = "/" + expression = expression[1:] + case ';': + result.first = ";" + result.sep = ";" + result.named = true + expression = expression[1:] + case '?': + result.first = "?" + result.sep = "&" + result.named = true + result.ifemp = "=" + expression = expression[1:] + case '&': + result.first = "&" + result.sep = "&" + result.named = true + result.ifemp = "=" + expression = expression[1:] + case '#': + result.first = "#" + result.sep = "," + result.allowReserved = true + expression = expression[1:] + default: + result.sep = "," + } + rawterms := strings.Split(expression, ",") + result.terms = make([]templateTerm, len(rawterms)) + for i, raw := range rawterms { + result.terms[i], err = parseTerm(raw) + if err != nil { + break + } + } + return result, err +} + +func parseTerm(term string) (result templateTerm, err error) { + if strings.HasSuffix(term, "*") { + result.explode = true + term = term[:len(term)-1] + } + split := strings.Split(term, ":") + if len(split) == 1 { + result.name = term + } else if len(split) == 2 { + result.name = split[0] + var parsed int64 + parsed, err = strconv.ParseInt(split[1], 10, 0) + result.truncate = int(parsed) + } else { + err = errors.New("multiple colons in same term") + } + if !validname.MatchString(result.name) { + err = errors.New("not a valid name: " + result.name) + } + if result.explode && result.truncate > 0 { + err = errors.New("both explode and prefix modifers on same term") + } + return result, err +} + +// Expand expands a URI template with a set of values to produce a string. +func (self *UriTemplate) Expand(value interface{}) (string, error) { + values, ismap := value.(map[string]interface{}) + if !ismap { + if m, ismap := struct2map(value); !ismap { + return "", errors.New("expected map[string]interface{}, struct, or pointer to struct.") + } else { + return self.Expand(m) + } + } + var buf bytes.Buffer + for _, p := range self.parts { + err := p.expand(&buf, values) + if err != nil { + return "", err + } + } + return buf.String(), nil +} + +func (self *templatePart) expand(buf *bytes.Buffer, values map[string]interface{}) error { + if len(self.raw) > 0 { + buf.WriteString(self.raw) + return nil + } + var zeroLen = buf.Len() + buf.WriteString(self.first) + var firstLen = buf.Len() + for _, term := range self.terms { + value, exists := values[term.name] + if !exists { + continue + } + if buf.Len() != firstLen { + buf.WriteString(self.sep) + } + switch v := value.(type) { + case string: + self.expandString(buf, term, v) + case []interface{}: + self.expandArray(buf, term, v) + case map[string]interface{}: + if term.truncate > 0 { + return errors.New("cannot truncate a map expansion") + } + self.expandMap(buf, term, v) + default: + if m, ismap := struct2map(value); ismap { + if term.truncate > 0 { + return errors.New("cannot truncate a map expansion") + } + self.expandMap(buf, term, m) + } else { + str := fmt.Sprintf("%v", value) + self.expandString(buf, term, str) + } + } + } + if buf.Len() == firstLen { + original := buf.Bytes()[:zeroLen] + buf.Reset() + buf.Write(original) + } + return nil +} + +func (self *templatePart) expandName(buf *bytes.Buffer, name string, empty bool) { + if self.named { + buf.WriteString(name) + if empty { + buf.WriteString(self.ifemp) + } else { + buf.WriteString("=") + } + } +} + +func (self *templatePart) expandString(buf *bytes.Buffer, t templateTerm, s string) { + if len(s) > t.truncate && t.truncate > 0 { + s = s[:t.truncate] + } + self.expandName(buf, t.name, len(s) == 0) + buf.WriteString(escape(s, self.allowReserved)) +} + +func (self *templatePart) expandArray(buf *bytes.Buffer, t templateTerm, a []interface{}) { + if len(a) == 0 { + return + } else if !t.explode { + self.expandName(buf, t.name, false) + } + for i, value := range a { + if t.explode && i > 0 { + buf.WriteString(self.sep) + } else if i > 0 { + buf.WriteString(",") + } + var s string + switch v := value.(type) { + case string: + s = v + default: + s = fmt.Sprintf("%v", v) + } + if len(s) > t.truncate && t.truncate > 0 { + s = s[:t.truncate] + } + if self.named && t.explode { + self.expandName(buf, t.name, len(s) == 0) + } + buf.WriteString(escape(s, self.allowReserved)) + } +} + +func (self *templatePart) expandMap(buf *bytes.Buffer, t templateTerm, m map[string]interface{}) { + if len(m) == 0 { + return + } + if !t.explode { + self.expandName(buf, t.name, len(m) == 0) + } + var firstLen = buf.Len() + for k, value := range m { + if firstLen != buf.Len() { + if t.explode { + buf.WriteString(self.sep) + } else { + buf.WriteString(",") + } + } + var s string + switch v := value.(type) { + case string: + s = v + default: + s = fmt.Sprintf("%v", v) + } + if t.explode { + buf.WriteString(escape(k, self.allowReserved)) + buf.WriteRune('=') + buf.WriteString(escape(s, self.allowReserved)) + } else { + buf.WriteString(escape(k, self.allowReserved)) + buf.WriteRune(',') + buf.WriteString(escape(s, self.allowReserved)) + } + } +} + +func struct2map(v interface{}) (map[string]interface{}, bool) { + value := reflect.ValueOf(v) + switch value.Type().Kind() { + case reflect.Ptr: + return struct2map(value.Elem().Interface()) + case reflect.Struct: + m := make(map[string]interface{}) + for i := 0; i < value.NumField(); i++ { + tag := value.Type().Field(i).Tag + var name string + if strings.Contains(string(tag), ":") { + name = tag.Get("uri") + } else { + name = strings.TrimSpace(string(tag)) + } + if len(name) == 0 { + name = value.Type().Field(i).Name + } + m[name] = value.Field(i).Interface() + } + return m, true + } + return nil, false +} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/utils.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/utils.go new file mode 100644 index 00000000000..399ef462369 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates/utils.go @@ -0,0 +1,13 @@ +package uritemplates + +func Expand(path string, expansions map[string]string) (string, error) { + template, err := Parse(path) + if err != nil { + return "", err + } + values := make(map[string]interface{}) + for k, v := range expansions { + values[k] = v + } + return template.Expand(values) +} diff --git a/hack/test-go.sh b/hack/test-go.sh index 48bac84d9ad..e82a70edebb 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -45,7 +45,7 @@ kube::test::find_pkgs() { # -covermode=atomic becomes default with -race in Go >=1.3 KUBE_COVER=${KUBE_COVER:--cover -covermode=atomic} -KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout 60s} +KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout 120s} KUBE_RACE=${KUBE_RACE:--race} kube::test::usage() { diff --git a/pkg/cloudprovider/fake/fake.go b/pkg/cloudprovider/fake/fake.go index 4af88bf4f28..242312bbc99 100644 --- a/pkg/cloudprovider/fake/fake.go +++ b/pkg/cloudprovider/fake/fake.go @@ -32,6 +32,8 @@ type FakeCloud struct { IP net.IP Machines []string NodeResources *api.NodeResources + ClusterList []string + MasterName string cloudprovider.Zone } @@ -45,6 +47,14 @@ func (f *FakeCloud) ClearCalls() { f.Calls = []string{} } +func (f *FakeCloud) ListClusters() ([]string, error) { + return f.ClusterList, f.Err +} + +func (f *FakeCloud) Master(name string) (string, error) { + return f.MasterName, f.Err +} + func (f *FakeCloud) Clusters() (cloudprovider.Clusters, bool) { return f, true }