From d319d4099e2a07180de431836e2365b566eab29d Mon Sep 17 00:00:00 2001 From: Dana Hoffman Date: Thu, 1 Dec 2016 12:26:13 -0800 Subject: [PATCH] vendor: update google apis --- .../v1/cloudresourcemanager-api.json | 541 ++++- .../v1/cloudresourcemanager-gen.go | 1787 ++++++++++++++++- .../api/container/v1/container-gen.go | 320 ++- .../google.golang.org/api/dns/v1/dns-api.json | 10 +- .../google.golang.org/api/dns/v1/dns-gen.go | 199 +- .../google.golang.org/api/gensupport/json.go | 28 +- .../api/gensupport/resumable.go | 42 +- .../google.golang.org/api/gensupport/retry.go | 8 +- .../google.golang.org/api/gensupport/send.go | 50 +- .../google.golang.org/api/iam/v1/iam-api.json | 400 ++-- .../google.golang.org/api/iam/v1/iam-gen.go | 1191 +++++++---- .../api/pubsub/v1/pubsub-api.json | 117 +- .../api/pubsub/v1/pubsub-gen.go | 955 ++++++++- .../api/sqladmin/v1beta4/sqladmin-api.json | 26 +- .../api/sqladmin/v1beta4/sqladmin-gen.go | 1025 +++++++++- .../api/storage/v1/storage-api.json | 50 +- .../api/storage/v1/storage-gen.go | 771 ++++++- vendor/vendor.json | 52 +- 18 files changed, 6550 insertions(+), 1022 deletions(-) diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json index 4961a4ba6..1f09e4f3e 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1,11 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/8EOgQpr1bAhvZ8Ay5woGZcfT03Y\"", + "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/KWbv1ck4Hir_ldCgHUUAxKHck4c\"", "discoveryVersion": "v1", "id": "cloudresourcemanager:v1", "name": "cloudresourcemanager", + "canonicalName": "Cloud Resource Manager", "version": "v1", - "revision": "20160225", + "revision": "20160927", "title": "Google Cloud Resource Manager API", "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "ownerDomain": "google.com", @@ -113,6 +114,235 @@ } }, "schemas": { + "Operation": { + "id": "Operation", + "type": "object", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "properties": { + "name": { + "type": "string", + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `operations/some/unique/name`." + }, + "metadata": { + "type": "object", + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + }, + "done": { + "type": "boolean", + "description": "If the value is `false`, it means the operation is still in progress. If true, the operation is completed, and either `error` or `response` is available." + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure." + }, + "response": { + "type": "object", + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + }, + "Status": { + "id": "Status", + "type": "object", + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be: - Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` which can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting purpose. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.", + "properties": { + "code": { + "type": "integer", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32" + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client." + }, + "details": { + "type": "array", + "description": "A list of messages that carry the error details. There will be a common set of message types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } + } + } + } + }, + "SearchOrganizationsRequest": { + "id": "SearchOrganizationsRequest", + "type": "object", + "description": "The request sent to the `SearchOrganizations` method.", + "properties": { + "pageSize": { + "type": "integer", + "description": "The maximum number of Organizations to return in the response. This field is optional.", + "format": "int32" + }, + "pageToken": { + "type": "string", + "description": "A pagination token returned from a previous call to `SearchOrganizations` that indicates from where listing should continue. This field is optional." + }, + "filter": { + "type": "string", + "description": "An optional query string used to filter the Organizations to return in the response. Filter rules are case-insensitive. Organizations may be filtered by `owner.directoryCustomerId` or by `domain`, where the domain is a Google for Work domain, for example: |Filter|Description| |------|-----------| |owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.| |domain:google.com|Organizations corresponding to the domain `google.com`.| This field is optional." + } + } + }, + "SearchOrganizationsResponse": { + "id": "SearchOrganizationsResponse", + "type": "object", + "description": "The response returned from the `SearchOrganizations` method.", + "properties": { + "organizations": { + "type": "array", + "description": "The list of Organizations that matched the search query, possibly paginated.", + "items": { + "$ref": "Organization" + } + }, + "nextPageToken": { + "type": "string", + "description": "A pagination token to be used to retrieve the next page of results. If the result is too large to fit within the page size specified in the request, this field will be set with a token that can be used to fetch the next page of results. If this field is empty, it indicates that this response contains the last page of results." + } + } + }, + "Organization": { + "id": "Organization", + "type": "object", + "description": "The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong.", + "properties": { + "name": { + "type": "string", + "description": "Output Only. The resource name of the organization. This is the organization's relative path in the API. Its format is \"organizations/[organization_id]\". For example, \"organizations/1234\"." + }, + "displayName": { + "type": "string", + "description": "A friendly string to be used to refer to the Organization in the UI. Assigned by the server, set to the firm name of the Google For Work customer that owns this organization. @OutputOnly" + }, + "owner": { + "$ref": "OrganizationOwner", + "description": "The owner of this Organization. The owner should be specified on creation. Once set, it cannot be changed. This field is required." + }, + "creationTime": { + "type": "string", + "description": "Timestamp when the Organization was created. Assigned by the server. @OutputOnly" + }, + "lifecycleState": { + "type": "string", + "description": "The organization's current lifecycle state. Assigned by the server. @OutputOnly", + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ] + } + } + }, + "OrganizationOwner": { + "id": "OrganizationOwner", + "type": "object", + "description": "The entity that owns an Organization. The lifetime of the Organization and all of its descendants are bound to the `OrganizationOwner`. If the `OrganizationOwner` is deleted, the Organization and all its descendants will be deleted.", + "properties": { + "directoryCustomerId": { + "type": "string", + "description": "The Google for Work customer id used in the Directory API." + } + } + }, + "SetIamPolicyRequest": { + "id": "SetIamPolicyRequest", + "type": "object", + "description": "Request message for `SetIamPolicy` method.", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + } + } + }, + "Policy": { + "id": "Policy", + "type": "object", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", + "properties": { + "version": { + "type": "integer", + "description": "Version of the `Policy`. The default version is 0.", + "format": "int32" + }, + "bindings": { + "type": "array", + "description": "Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.", + "items": { + "$ref": "Binding" + } + }, + "etag": { + "type": "string", + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", + "format": "byte" + } + } + }, + "Binding": { + "id": "Binding", + "type": "object", + "description": "Associates `members` with a `role`.", + "properties": { + "role": { + "type": "string", + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required" + }, + "members": { + "type": "array", + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", + "items": { + "type": "string" + } + } + } + }, + "GetIamPolicyRequest": { + "id": "GetIamPolicyRequest", + "type": "object", + "description": "Request message for `GetIamPolicy` method." + }, + "TestIamPermissionsRequest": { + "id": "TestIamPermissionsRequest", + "type": "object", + "description": "Request message for `TestIamPermissions` method.", + "properties": { + "permissions": { + "type": "array", + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + } + } + } + }, + "TestIamPermissionsResponse": { + "id": "TestIamPermissionsResponse", + "type": "object", + "description": "Response message for `TestIamPermissions` method.", + "properties": { + "permissions": { + "type": "array", + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + } + } + } + }, "Project": { "id": "Project", "type": "object", @@ -139,7 +369,7 @@ }, "name": { "type": "string", - "description": "The user-assigned name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write." + "description": "The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: My Project Read-write." }, "createTime": { "type": "string", @@ -201,94 +431,234 @@ "type": "object", "description": "The request sent to the UndeleteProject method." }, - "GetIamPolicyRequest": { - "id": "GetIamPolicyRequest", + "ProjectCreationStatus": { + "id": "ProjectCreationStatus", "type": "object", - "description": "Request message for `GetIamPolicy` method." - }, - "Policy": { - "id": "Policy", - "type": "object", - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", + "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.", "properties": { - "version": { - "type": "integer", - "description": "Version of the `Policy`. The default version is 0.", - "format": "int32" - }, - "bindings": { - "type": "array", - "description": "Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - } - }, - "etag": { + "createTime": { "type": "string", - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", - "format": "byte" - } - } - }, - "Binding": { - "id": "Binding", - "type": "object", - "description": "Associates `members` with a `role`.", - "properties": { - "role": { - "type": "string", - "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required" + "description": "Creation time of the project creation workflow." }, - "members": { - "type": "array", - "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.", - "items": { - "type": "string" - } + "gettable": { + "type": "boolean", + "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete." + }, + "ready": { + "type": "boolean", + "description": "True if the project creation process is complete." } } }, - "SetIamPolicyRequest": { - "id": "SetIamPolicyRequest", + "FolderOperation": { + "id": "FolderOperation", "type": "object", - "description": "Request message for `SetIamPolicy` method.", + "description": "Metadata describing a long running folder operation", "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + "displayName": { + "type": "string", + "description": "The display name of the folder." + }, + "operationType": { + "type": "string", + "description": "The type of this operation.", + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE", + "MOVE" + ] + }, + "sourceParent": { + "type": "string", + "description": "The resource name of the folder's parent. Only applicable when the operation_type is MOVE." + }, + "destinationParent": { + "type": "string", + "description": "The resource name of the folder or organization we are either creating the folder under or moving the folder to." } } }, - "TestIamPermissionsRequest": { - "id": "TestIamPermissionsRequest", + "FolderOperationError": { + "id": "FolderOperationError", "type": "object", - "description": "Request message for `TestIamPermissions` method.", + "description": "A classification of the Folder Operation error.", "properties": { - "permissions": { - "type": "array", - "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.", - "items": { - "type": "string" - } - } - } - }, - "TestIamPermissionsResponse": { - "id": "TestIamPermissionsResponse", - "type": "object", - "description": "Response message for `TestIamPermissions` method.", - "properties": { - "permissions": { - "type": "array", - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - } + "errorMessageId": { + "type": "string", + "description": "The type of operation error experienced.", + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "FOLDER_HEIGHT_VIOLATION", + "MAX_CHILD_FOLDERS_VIOLATION", + "FOLDER_NAME_UNIQUENESS_VIOLATION", + "RESOURCE_DELETED", + "PARENT_DELETED", + "CYCLE_INTRODUCED_ERROR", + "FOLDER_ALREADY_BEING_MOVED", + "FOLDER_TO_DELETE_NON_EMPTY" + ] } } } }, "resources": { + "operations": { + "methods": { + "get": { + "id": "cloudresourcemanager.operations.get", + "path": "v1/{+name}", + "httpMethod": "GET", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "parameters": { + "name": { + "type": "string", + "description": "The name of the operation resource.", + "required": true, + "pattern": "^operations/.*$", + "location": "path" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, + "organizations": { + "methods": { + "search": { + "id": "cloudresourcemanager.organizations.search", + "path": "v1/organizations:search", + "httpMethod": "POST", + "description": "Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results.", + "request": { + "$ref": "SearchOrganizationsRequest" + }, + "response": { + "$ref": "SearchOrganizationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "get": { + "id": "cloudresourcemanager.organizations.get", + "path": "v1/{+name}", + "httpMethod": "GET", + "description": "Fetches an Organization resource identified by the specified resource name.", + "parameters": { + "name": { + "type": "string", + "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + "required": true, + "pattern": "^organizations/[^/]*$", + "location": "path" + } + }, + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Organization" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "setIamPolicy": { + "id": "cloudresourcemanager.organizations.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".", + "parameters": { + "resource": { + "type": "string", + "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + "required": true, + "pattern": "^organizations/[^/]*$", + "location": "path" + } + }, + "parameterOrder": [ + "resource" + ], + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "id": "cloudresourcemanager.organizations.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "httpMethod": "POST", + "description": "Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".", + "parameters": { + "resource": { + "type": "string", + "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + "required": true, + "pattern": "^organizations/[^/]*$", + "location": "path" + } + }, + "parameterOrder": [ + "resource" + ], + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "testIamPermissions": { + "id": "cloudresourcemanager.organizations.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".", + "parameters": { + "resource": { + "type": "string", + "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + "required": true, + "pattern": "^organizations/[^/]*$", + "location": "path" + } + }, + "parameterOrder": [ + "resource" + ], + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, "projects": { "methods": { "get": { @@ -346,6 +716,21 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ] }, + "create": { + "id": "cloudresourcemanager.projects.create", + "path": "v1/projects", + "httpMethod": "POST", + "description": "Request that a new Project be created. The result is an Operation which can be used to track the creation process. It is automatically deleted after a few hours, so there is no need to call DeleteOperation. Our SLO permits Project creation to take up to 30 seconds at the 90th percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile latency. 95th percentile latency is around 11 seconds. We recommend polling at the 5th second with an exponential backoff.", + "request": { + "$ref": "Project" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "update": { "id": "cloudresourcemanager.projects.update", "path": "v1/projects/{projectId}", @@ -376,7 +761,7 @@ "id": "cloudresourcemanager.projects.delete", "path": "v1/projects/{projectId}", "httpMethod": "DELETE", - "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the lifecycle state changes to DELETE_IN_PROGRESS. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.", + "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.", "parameters": { "projectId": { "type": "string", @@ -399,7 +784,7 @@ "id": "cloudresourcemanager.projects.undelete", "path": "v1/projects/{projectId}:undelete", "httpMethod": "POST", - "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The caller must have modify permissions for this Project.", + "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.", "parameters": { "projectId": { "type": "string", @@ -429,7 +814,7 @@ "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "location": "path" } @@ -452,11 +837,11 @@ "id": "cloudresourcemanager.projects.setIamPolicy", "path": "v1/projects/{resource}:setIamPolicy", "httpMethod": "POST", - "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project currently supports only `user:{emailid}` and `serviceAccount:{emailid}` members in a `Binding` of a `Policy`. + To be added as an `owner`, a user must be invited via Cloud Platform console and must accept the invitation. + Members cannot be added to more than one role in the same policy. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.", + "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted only to `user` and `serviceAccount`. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.", "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "location": "path" } @@ -482,7 +867,7 @@ "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "location": "path" } diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go index 5747e48b7..5a435ce92 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -59,6 +59,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Operations = NewOperationsService(s) + s.Organizations = NewOrganizationsService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -68,6 +70,10 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Operations *OperationsService + + Organizations *OrganizationsService + Projects *ProjectsService } @@ -78,6 +84,24 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewOperationsService(s *Service) *OperationsService { + rs := &OperationsService{s: s} + return rs +} + +type OperationsService struct { + s *Service +} + +func NewOrganizationsService(s *Service) *OrganizationsService { + rs := &OrganizationsService{s: s} + return rs +} + +type OrganizationsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} return rs @@ -117,12 +141,20 @@ type Binding struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Members") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Binding) MarshalJSON() ([]byte, error) { type noMethod Binding raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Empty: A generic empty message that you can re-use to avoid defining @@ -137,6 +169,91 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// FolderOperation: Metadata describing a long running folder operation +type FolderOperation struct { + // DestinationParent: The resource name of the folder or organization we + // are either creating the folder under or moving the folder to. + DestinationParent string `json:"destinationParent,omitempty"` + + // DisplayName: The display name of the folder. + DisplayName string `json:"displayName,omitempty"` + + // OperationType: The type of this operation. + // + // Possible values: + // "OPERATION_TYPE_UNSPECIFIED" + // "CREATE" + // "MOVE" + OperationType string `json:"operationType,omitempty"` + + // SourceParent: The resource name of the folder's parent. Only + // applicable when the operation_type is MOVE. + SourceParent string `json:"sourceParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestinationParent") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestinationParent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FolderOperation) MarshalJSON() ([]byte, error) { + type noMethod FolderOperation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FolderOperationError: A classification of the Folder Operation error. +type FolderOperationError struct { + // ErrorMessageId: The type of operation error experienced. + // + // Possible values: + // "ERROR_TYPE_UNSPECIFIED" + // "FOLDER_HEIGHT_VIOLATION" + // "MAX_CHILD_FOLDERS_VIOLATION" + // "FOLDER_NAME_UNIQUENESS_VIOLATION" + // "RESOURCE_DELETED" + // "PARENT_DELETED" + // "CYCLE_INTRODUCED_ERROR" + // "FOLDER_ALREADY_BEING_MOVED" + // "FOLDER_TO_DELETE_NON_EMPTY" + ErrorMessageId string `json:"errorMessageId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorMessageId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorMessageId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FolderOperationError) MarshalJSON() ([]byte, error) { + type noMethod FolderOperationError + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GetIamPolicyRequest: Request message for `GetIamPolicy` method. type GetIamPolicyRequest struct { } @@ -170,12 +287,176 @@ type ListProjectsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListProjectsResponse) MarshalJSON() ([]byte, error) { type noMethod ListProjectsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If true, the operation is completed, and either `error` or + // `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata OperationMetadata `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should have the format of + // `operations/some/unique/name`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response OperationResponse `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type noMethod Operation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type OperationMetadata interface{} + +type OperationResponse interface{} + +// Organization: The root node in the resource hierarchy to which a +// particular entity's (e.g., company) resources belong. +type Organization struct { + // CreationTime: Timestamp when the Organization was created. Assigned + // by the server. @OutputOnly + CreationTime string `json:"creationTime,omitempty"` + + // DisplayName: A friendly string to be used to refer to the + // Organization in the UI. Assigned by the server, set to the firm name + // of the Google For Work customer that owns this organization. + // @OutputOnly + DisplayName string `json:"displayName,omitempty"` + + // LifecycleState: The organization's current lifecycle state. Assigned + // by the server. @OutputOnly + // + // Possible values: + // "LIFECYCLE_STATE_UNSPECIFIED" + // "ACTIVE" + // "DELETE_REQUESTED" + LifecycleState string `json:"lifecycleState,omitempty"` + + // Name: Output Only. The resource name of the organization. This is the + // organization's relative path in the API. Its format is + // "organizations/[organization_id]". For example, "organizations/1234". + Name string `json:"name,omitempty"` + + // Owner: The owner of this Organization. The owner should be specified + // on creation. Once set, it cannot be changed. This field is required. + Owner *OrganizationOwner `json:"owner,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Organization) MarshalJSON() ([]byte, error) { + type noMethod Organization + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OrganizationOwner: The entity that owns an Organization. The lifetime +// of the Organization and all of its descendants are bound to the +// `OrganizationOwner`. If the `OrganizationOwner` is deleted, the +// Organization and all its descendants will be deleted. +type OrganizationOwner struct { + // DirectoryCustomerId: The Google for Work customer id used in the + // Directory API. + DirectoryCustomerId string `json:"directoryCustomerId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DirectoryCustomerId") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DirectoryCustomerId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *OrganizationOwner) MarshalJSON() ([]byte, error) { + type noMethod OrganizationOwner + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Policy: Defines an Identity and Access Management (IAM) policy. It is @@ -222,12 +503,20 @@ type Policy struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bindings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Policy) MarshalJSON() ([]byte, error) { type noMethod Policy raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Project: A Project is a high-level Google Cloud Platform entity. It @@ -257,10 +546,10 @@ type Project struct { // "DELETE_IN_PROGRESS" LifecycleState string `json:"lifecycleState,omitempty"` - // Name: The user-assigned name of the Project. It must be 4 to 30 - // characters. Allowed characters are: lowercase and uppercase letters, - // numbers, hyphen, single-quote, double-quote, space, and exclamation - // point. Example: My Project Read-write. + // Name: The user-assigned display name of the Project. It must be 4 to + // 30 characters. Allowed characters are: lowercase and uppercase + // letters, numbers, hyphen, single-quote, double-quote, space, and + // exclamation point. Example: My Project Read-write. Name string `json:"name,omitempty"` // Parent: An optional reference to a parent Resource. The only @@ -289,12 +578,59 @@ type Project struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Project) MarshalJSON() ([]byte, error) { type noMethod Project raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ProjectCreationStatus: A status object which is used as the +// `metadata` field for the Operation returned by CreateProject. It +// provides insight for when significant phases of Project creation have +// completed. +type ProjectCreationStatus struct { + // CreateTime: Creation time of the project creation workflow. + CreateTime string `json:"createTime,omitempty"` + + // Gettable: True if the project can be retrieved using GetProject. No + // other operations on the project are guaranteed to work until the + // project creation is complete. + Gettable bool `json:"gettable,omitempty"` + + // Ready: True if the project creation process is complete. + Ready bool `json:"ready,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ProjectCreationStatus) MarshalJSON() ([]byte, error) { + type noMethod ProjectCreationStatus + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ResourceId: A container to reference an id for any resource type. A @@ -318,12 +654,108 @@ type ResourceId struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ResourceId) MarshalJSON() ([]byte, error) { type noMethod ResourceId raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SearchOrganizationsRequest: The request sent to the +// `SearchOrganizations` method. +type SearchOrganizationsRequest struct { + // Filter: An optional query string used to filter the Organizations to + // return in the response. Filter rules are case-insensitive. + // Organizations may be filtered by `owner.directoryCustomerId` or by + // `domain`, where the domain is a Google for Work domain, for example: + // |Filter|Description| |------|-----------| + // |owner.directorycustomerid:123456789|Organizations with + // `owner.directory_customer_id` equal to `123456789`.| + // |domain:google.com|Organizations corresponding to the domain + // `google.com`.| This field is optional. + Filter string `json:"filter,omitempty"` + + // PageSize: The maximum number of Organizations to return in the + // response. This field is optional. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A pagination token returned from a previous call to + // `SearchOrganizations` that indicates from where listing should + // continue. This field is optional. + PageToken string `json:"pageToken,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SearchOrganizationsRequest) MarshalJSON() ([]byte, error) { + type noMethod SearchOrganizationsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SearchOrganizationsResponse: The response returned from the +// `SearchOrganizations` method. +type SearchOrganizationsResponse struct { + // NextPageToken: A pagination token to be used to retrieve the next + // page of results. If the result is too large to fit within the page + // size specified in the request, this field will be set with a token + // that can be used to fetch the next page of results. If this field is + // empty, it indicates that this response contains the last page of + // results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Organizations: The list of Organizations that matched the search + // query, possibly paginated. + Organizations []*Organization `json:"organizations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SearchOrganizationsResponse) MarshalJSON() ([]byte, error) { + type noMethod SearchOrganizationsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SetIamPolicyRequest: Request message for `SetIamPolicy` method. @@ -341,20 +773,104 @@ type SetIamPolicyRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { type noMethod SetIamPolicyRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by [gRPC](https://github.com/grpc). The +// error model is designed to be: - Simple to use and understand for +// most users - Flexible enough to meet unexpected needs # Overview The +// `Status` message contains three pieces of data: error code, error +// message, and error details. The error code should be an enum value of +// google.rpc.Code, but it may accept additional error codes if needed. +// The error message should be a developer-facing English message that +// helps developers *understand* and *resolve* the error. If a localized +// user-facing error message is needed, put the localized message in the +// error details or localize it in the client. The optional error +// details may contain arbitrary information about the error. There is a +// predefined set of error detail types in the package `google.rpc` +// which can be used for common error conditions. # Language mapping The +// `Status` message is the logical representation of the error model, +// but it is not necessarily the actual wire format. When the `Status` +// message is exposed in different client libraries and different wire +// protocols, it can be mapped differently. For example, it will likely +// be mapped to some exceptions in Java, but more likely mapped to some +// error codes in C. # Other uses The error model and the `Status` +// message can be used in a variety of environments, either with or +// without APIs, to provide a consistent developer experience across +// different environments. Example uses of this error model include: - +// Partial errors. If a service needs to return partial errors to the +// client, it may embed the `Status` in the normal response to indicate +// the partial errors. - Workflow errors. A typical workflow has +// multiple steps. Each step may have a `Status` message for error +// reporting purpose. - Batch operations. If a client uses batch request +// and batch response, the `Status` message should be used directly +// inside batch response, one for each error sub-response. - +// Asynchronous operations. If an API call embeds asynchronous operation +// results in its response, the status of those operations should be +// represented directly using the `Status` message. - Logging. If some +// API errors are stored in logs, the message `Status` could be used +// directly after any stripping needed for security/privacy reasons. +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There will + // be a common set of message types for APIs to use. + Details []StatusDetails `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type noMethod Status + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type StatusDetails interface{} + // TestIamPermissionsRequest: Request message for `TestIamPermissions` // method. type TestIamPermissionsRequest struct { // Permissions: The set of permissions to check for the `resource`. // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. For more information see IAM Overview. + // allowed. For more information see [IAM + // Overview](https://cloud.google.com/iam/docs/overview#permissions). Permissions []string `json:"permissions,omitempty"` // ForceSendFields is a list of field names (e.g. "Permissions") to @@ -364,12 +880,20 @@ type TestIamPermissionsRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { type noMethod TestIamPermissionsRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // TestIamPermissionsResponse: Response message for `TestIamPermissions` @@ -390,12 +914,20 @@ type TestIamPermissionsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { type noMethod TestIamPermissionsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // UndeleteProjectRequest: The request sent to the UndeleteProject @@ -403,6 +935,943 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { type UndeleteProjectRequest struct { } +// method id "cloudresourcemanager.operations.get": + +type OperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudresourcemanager.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "httpMethod": "GET", + // "id": "cloudresourcemanager.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "cloudresourcemanager.organizations.get": + +type OrganizationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Fetches an Organization resource identified by the specified +// resource name. +func (r *OrganizationsService) Get(name string) *OrganizationsGetCall { + c := &OrganizationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsGetCall) Fields(s ...googleapi.Field) *OrganizationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsGetCall) IfNoneMatch(entityTag string) *OrganizationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsGetCall) Context(ctx context.Context) *OrganizationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudresourcemanager.organizations.get" call. +// Exactly one of *Organization or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Organization.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*Organization, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Organization{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Fetches an Organization resource identified by the specified resource name.", + // "httpMethod": "GET", + // "id": "cloudresourcemanager.organizations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + // "location": "path", + // "pattern": "^organizations/[^/]*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Organization" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "cloudresourcemanager.organizations.getIamPolicy": + +type OrganizationsGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for an Organization +// resource. May be empty if no such policy or resource exists. The +// `resource` field should be the organization's resource name, e.g. +// "organizations/123". +func (r *OrganizationsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsGetIamPolicyCall { + c := &OrganizationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + 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 *OrganizationsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudresourcemanager.organizations.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".", + // "httpMethod": "POST", + // "id": "cloudresourcemanager.organizations.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + // "location": "path", + // "pattern": "^organizations/[^/]*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "cloudresourcemanager.organizations.search": + +type OrganizationsSearchCall struct { + s *Service + searchorganizationsrequest *SearchOrganizationsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Searches Organization resources that are visible to the user +// and satisfy the specified filter. This method returns Organizations +// in an unspecified order. New Organizations do not necessarily appear +// at the end of the results. +func (r *OrganizationsService) Search(searchorganizationsrequest *SearchOrganizationsRequest) *OrganizationsSearchCall { + c := &OrganizationsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.searchorganizationsrequest = searchorganizationsrequest + 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 *OrganizationsSearchCall) Fields(s ...googleapi.Field) *OrganizationsSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsSearchCall) Context(ctx context.Context) *OrganizationsSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchorganizationsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/organizations:search") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudresourcemanager.organizations.search" call. +// Exactly one of *SearchOrganizationsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *SearchOrganizationsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchOrganizationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &SearchOrganizationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results.", + // "httpMethod": "POST", + // "id": "cloudresourcemanager.organizations.search", + // "path": "v1/organizations:search", + // "request": { + // "$ref": "SearchOrganizationsRequest" + // }, + // "response": { + // "$ref": "SearchOrganizationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "cloudresourcemanager.organizations.setIamPolicy": + +type OrganizationsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on an Organization +// resource. Replaces any existing policy. The `resource` field should +// be the organization's resource name, e.g. "organizations/123". +func (r *OrganizationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsSetIamPolicyCall { + c := &OrganizationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudresourcemanager.organizations.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *OrganizationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".", + // "httpMethod": "POST", + // "id": "cloudresourcemanager.organizations.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + // "location": "path", + // "pattern": "^organizations/[^/]*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudresourcemanager.organizations.testIamPermissions": + +type OrganizationsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified Organization. The `resource` field should be the +// organization's resource name, e.g. "organizations/123". +func (r *OrganizationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsTestIamPermissionsCall { + c := &OrganizationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudresourcemanager.organizations.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. \"organizations/123\".", + // "httpMethod": "POST", + // "id": "cloudresourcemanager.organizations.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + // "location": "path", + // "pattern": "^organizations/[^/]*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "cloudresourcemanager.projects.create": + +type ProjectsCreateCall struct { + s *Service + project *Project + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Request that a new Project be created. The result is an +// Operation which can be used to track the creation process. It is +// automatically deleted after a few hours, so there is no need to call +// DeleteOperation. Our SLO permits Project creation to take up to 30 +// seconds at the 90th percentile. As of 2016-08-29, we are observing 6 +// seconds 50th percentile latency. 95th percentile latency is around 11 +// seconds. We recommend polling at the 5th second with an exponential +// backoff. +func (r *ProjectsService) Create(project *Project) *ProjectsCreateCall { + c := &ProjectsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsCreateCall) Context(ctx context.Context) *ProjectsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.project) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudresourcemanager.projects.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Request that a new Project be created. The result is an Operation which can be used to track the creation process. It is automatically deleted after a few hours, so there is no need to call DeleteOperation. Our SLO permits Project creation to take up to 30 seconds at the 90th percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile latency. 95th percentile latency is around 11 seconds. We recommend polling at the 5th second with an exponential backoff.", + // "httpMethod": "POST", + // "id": "cloudresourcemanager.projects.create", + // "path": "v1/projects", + // "request": { + // "$ref": "Project" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudresourcemanager.projects.delete": type ProjectsDeleteCall struct { @@ -410,6 +1879,7 @@ type ProjectsDeleteCall struct { projectId string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Marks the Project identified by the specified `project_id` @@ -418,11 +1888,11 @@ type ProjectsDeleteCall struct { // does not have a billing account associated with it. + The Project has // a lifecycle state of ACTIVE. This method changes the Project's // lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts -// at an unspecified time, at which point the lifecycle state changes to -// DELETE_IN_PROGRESS. Until the deletion completes, you can check the -// lifecycle state checked by retrieving the Project with GetProject, -// and the Project remains visible to ListProjects. However, you cannot -// update the project. After the deletion completes, the Project is not +// at an unspecified time, at which point the Project is no longer +// accessible. Until the deletion completes, you can check the lifecycle +// state checked by retrieving the Project with GetProject, and the +// Project remains visible to ListProjects. However, you cannot update +// the project. After the deletion completes, the Project is not // retrievable by the GetProject and ListProjects methods. The caller // must have modify permissions for this Project. func (r *ProjectsService) Delete(projectId string) *ProjectsDeleteCall { @@ -447,20 +1917,31 @@ func (c *ProjectsDeleteCall) Context(ctx context.Context) *ProjectsDeleteCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.delete" call. @@ -495,12 +1976,13 @@ func (c *ProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the lifecycle state changes to DELETE_IN_PROGRESS. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.", + // "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if the following criteria are met: + The Project does not have a billing account associated with it. + The Project has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have modify permissions for this Project.", // "httpMethod": "DELETE", // "id": "cloudresourcemanager.projects.delete", // "parameterOrder": [ @@ -533,6 +2015,7 @@ type ProjectsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves the Project identified by the specified `project_id` @@ -570,23 +2053,34 @@ func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - req.Header.Set("If-None-Match", c.ifNoneMatch_) - } - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.get" call. @@ -621,7 +2115,8 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil @@ -660,6 +2155,7 @@ type ProjectsGetIamPolicyCall struct { getiampolicyrequest *GetIamPolicyRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // GetIamPolicy: Returns the IAM access control policy for the specified @@ -688,26 +2184,36 @@ func (c *ProjectsGetIamPolicyCall) Context(ctx context.Context) *ProjectsGetIamP return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.getIamPolicy" call. @@ -742,7 +2248,8 @@ func (c *ProjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil @@ -755,7 +2262,7 @@ func (c *ProjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "required": true, // "type": "string" @@ -783,6 +2290,7 @@ type ProjectsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists Projects that are visible to the user and satisfy the @@ -852,21 +2360,31 @@ func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) - googleapi.SetOpaque(req.URL) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - req.Header.Set("If-None-Match", c.ifNoneMatch_) - } - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.list" call. @@ -901,7 +2419,8 @@ func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectsRespon HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil @@ -968,23 +2487,35 @@ type ProjectsSetIamPolicyCall struct { setiampolicyrequest *SetIamPolicyRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // SetIamPolicy: Sets the IAM access control policy for the specified // Project. Replaces any existing policy. The following constraints -// apply when using `setIamPolicy()`: + Project currently supports only -// `user:{emailid}` and `serviceAccount:{emailid}` members in a -// `Binding` of a `Policy`. + To be added as an `owner`, a user must be -// invited via Cloud Platform console and must accept the invitation. + -// Members cannot be added to more than one role in the same policy. + -// There must be at least one owner who has accepted the Terms of -// Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to -// remove the last ToS-accepted owner from the policy will fail. + -// Calling this method requires enabling the App Engine Admin API. Note: -// Removing service accounts from policies or changing their roles can -// render services completely inoperable. It is important to understand -// how the service account is being used before removing or updating its -// roles. +// apply when using `setIamPolicy()`: + Project does not support +// `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of +// a `Policy`. + The owner role can be granted only to `user` and +// `serviceAccount`. + Service accounts can be made owners of a project +// directly without any restrictions. However, to be added as an owner, +// a user must be invited via Cloud Platform console and must accept the +// invitation. + A user cannot be granted the owner role using +// `setIamPolicy()`. The user must be granted the owner role using the +// Cloud Platform Console and must explicitly accept the invitation. + +// Invitations to grant the owner role cannot be sent using +// `setIamPolicy()`; they must be sent only using the Cloud Platform +// Console. + Membership changes that leave the project without any +// owners that have accepted the Terms of Service (ToS) will be +// rejected. + There must be at least one owner who has accepted the +// Terms of Service (ToS) agreement in the policy. Calling +// `setIamPolicy()` to to remove the last ToS-accepted owner from the +// policy will fail. This restriction also applies to legacy projects +// that no longer have owners who have accepted the ToS. Edits to IAM +// policies will be rejected until the lack of a ToS-accepting owner is +// rectified. + Calling this method requires enabling the App Engine +// Admin API. Note: Removing service accounts from policies or changing +// their roles can render services completely inoperable. It is +// important to understand how the service account is being used before +// removing or updating its roles. func (r *ProjectsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsSetIamPolicyCall { c := &ProjectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -1008,26 +2539,36 @@ func (c *ProjectsSetIamPolicyCall) Context(ctx context.Context) *ProjectsSetIamP return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.setIamPolicy" call. @@ -1062,12 +2603,13 @@ func (c *ProjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project currently supports only `user:{emailid}` and `serviceAccount:{emailid}` members in a `Binding` of a `Policy`. + To be added as an `owner`, a user must be invited via Cloud Platform console and must accept the invitation. + Members cannot be added to more than one role in the same policy. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.", + // "description": "Sets the IAM access control policy for the specified Project. Replaces any existing policy. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted only to `user` and `serviceAccount`. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + There must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles.", // "httpMethod": "POST", // "id": "cloudresourcemanager.projects.setIamPolicy", // "parameterOrder": [ @@ -1075,7 +2617,7 @@ func (c *ProjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "required": true, // "type": "string" @@ -1103,6 +2645,7 @@ type ProjectsTestIamPermissionsCall struct { testiampermissionsrequest *TestIamPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // TestIamPermissions: Returns permissions that a caller has on the @@ -1130,26 +2673,36 @@ func (c *ProjectsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsT return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.testIamPermissions" call. @@ -1184,7 +2737,8 @@ func (c *ProjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil @@ -1197,7 +2751,7 @@ func (c *ProjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "required": true, // "type": "string" @@ -1226,14 +2780,14 @@ type ProjectsUndeleteCall struct { undeleteprojectrequest *UndeleteProjectRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Undelete: Restores the Project identified by the specified // `project_id` (for example, `my-project-123`). You can only use this // method for a Project that has a lifecycle state of DELETE_REQUESTED. -// After deletion starts, as indicated by a lifecycle state of -// DELETE_IN_PROGRESS, the Project cannot be restored. The caller must -// have modify permissions for this Project. +// After deletion starts, the Project cannot be restored. The caller +// must have modify permissions for this Project. func (r *ProjectsService) Undelete(projectId string, undeleteprojectrequest *UndeleteProjectRequest) *ProjectsUndeleteCall { c := &ProjectsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.projectId = projectId @@ -1257,26 +2811,36 @@ func (c *ProjectsUndeleteCall) Context(ctx context.Context) *ProjectsUndeleteCal return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsUndeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsUndeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteprojectrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:undelete") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.undelete" call. @@ -1311,12 +2875,13 @@ func (c *ProjectsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The caller must have modify permissions for this Project.", + // "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have modify permissions for this Project.", // "httpMethod": "POST", // "id": "cloudresourcemanager.projects.undelete", // "parameterOrder": [ @@ -1352,6 +2917,7 @@ type ProjectsUpdateCall struct { project *Project urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates the attributes of the Project identified by the @@ -1380,26 +2946,36 @@ func (c *ProjectsUpdateCall) Context(ctx context.Context) *ProjectsUpdateCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.project) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PUT", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "projectId": c.projectId, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "cloudresourcemanager.projects.update" call. @@ -1434,7 +3010,8 @@ func (c *ProjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Project, error) HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go index bc31573b3..644e1de7c 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -154,12 +154,21 @@ type AddonsConfig struct { // field is empty or not. This may be used to include empty fields in // Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HorizontalPodAutoscaling") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *AddonsConfig) MarshalJSON() ([]byte, error) { type noMethod AddonsConfig raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Cluster: A Google Container Engine cluster. @@ -322,12 +331,20 @@ type Cluster struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddonsConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Cluster) MarshalJSON() ([]byte, error) { type noMethod Cluster raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ClusterUpdate: ClusterUpdate describes an update to the cluster. @@ -366,12 +383,21 @@ type ClusterUpdate struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DesiredAddonsConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ClusterUpdate) MarshalJSON() ([]byte, error) { type noMethod ClusterUpdate raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // CreateClusterRequest: CreateClusterRequest creates a cluster. @@ -387,12 +413,20 @@ type CreateClusterRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cluster") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) { type noMethod CreateClusterRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for @@ -408,12 +442,20 @@ type CreateNodePoolRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NodePool") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) { type noMethod CreateNodePoolRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // HorizontalPodAutoscaling: Configuration options for the horizontal @@ -434,12 +476,20 @@ type HorizontalPodAutoscaling struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) { type noMethod HorizontalPodAutoscaling raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // HttpLoadBalancing: Configuration options for the HTTP (L7) load @@ -458,12 +508,20 @@ type HttpLoadBalancing struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) { type noMethod HttpLoadBalancing raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ListClustersResponse: ListClustersResponse is the result of @@ -488,12 +546,20 @@ type ListClustersResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Clusters") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListClustersResponse) MarshalJSON() ([]byte, error) { type noMethod ListClustersResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ListNodePoolsResponse: ListNodePoolsResponse is the result of @@ -513,12 +579,20 @@ type ListNodePoolsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NodePools") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) { type noMethod ListNodePoolsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ListOperationsResponse: ListOperationsResponse is the result of @@ -543,12 +617,20 @@ type ListOperationsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MissingZones") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { type noMethod ListOperationsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // MasterAuth: The authentication information for accessing the master @@ -583,12 +665,21 @@ type MasterAuth struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientCertificate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *MasterAuth) MarshalJSON() ([]byte, error) { type noMethod MasterAuth raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // NodeConfig: Parameters that describe the nodes in a cluster. @@ -635,12 +726,20 @@ type NodeConfig struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskSizeGb") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *NodeConfig) MarshalJSON() ([]byte, error) { type noMethod NodeConfig raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // NodePool: NodePool contains the name and configuration for a @@ -700,12 +799,20 @@ type NodePool struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *NodePool) MarshalJSON() ([]byte, error) { type noMethod NodePool raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Operation: This operation resource represents operations that may @@ -767,12 +874,20 @@ type Operation struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Detail") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Operation) MarshalJSON() ([]byte, error) { type noMethod Operation raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ServerConfig: Container Engine service configuration. @@ -802,12 +917,21 @@ type ServerConfig struct { // field is empty or not. This may be used to include empty fields in // Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DefaultClusterVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ServerConfig) MarshalJSON() ([]byte, error) { type noMethod ServerConfig raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // UpdateClusterRequest: UpdateClusterRequest updates the settings of a @@ -823,12 +947,20 @@ type UpdateClusterRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Update") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { type noMethod UpdateClusterRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // method id "container.projects.zones.getServerconfig": @@ -840,6 +972,7 @@ type ProjectsZonesGetServerconfigCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // GetServerconfig: Returns configuration info about the Container @@ -877,8 +1010,20 @@ func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *Project return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesGetServerconfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -975,6 +1120,7 @@ type ProjectsZonesClustersCreateCall struct { createclusterrequest *CreateClusterRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Create: Creates a cluster, consisting of the specified number and @@ -1010,8 +1156,20 @@ func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *Projects return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) @@ -1113,6 +1271,7 @@ type ProjectsZonesClustersDeleteCall struct { clusterId string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes the cluster, including the Kubernetes endpoint and @@ -1145,8 +1304,20 @@ func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *Projects return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -1249,6 +1420,7 @@ type ProjectsZonesClustersGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Gets the details of a specific cluster. @@ -1286,8 +1458,20 @@ func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZon return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1392,6 +1576,7 @@ type ProjectsZonesClustersListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists all clusters owned by a project in either the specified @@ -1429,8 +1614,20 @@ func (c *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZo return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1528,6 +1725,7 @@ type ProjectsZonesClustersUpdateCall struct { updateclusterrequest *UpdateClusterRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates the settings of a specific cluster. @@ -1556,8 +1754,20 @@ func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *Projects return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) @@ -1668,6 +1878,7 @@ type ProjectsZonesClustersNodePoolsCreateCall struct { createnodepoolrequest *CreateNodePoolRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Create: Creates a node pool for a cluster. @@ -1696,8 +1907,20 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context) return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) @@ -1808,6 +2031,7 @@ type ProjectsZonesClustersNodePoolsDeleteCall struct { nodePoolId string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes a node pool from a cluster. @@ -1836,8 +2060,20 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context) return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -1949,6 +2185,7 @@ type ProjectsZonesClustersNodePoolsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves the node pool requested. @@ -1987,8 +2224,20 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *Pr return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2102,6 +2351,7 @@ type ProjectsZonesClustersNodePoolsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists the node pools for a cluster. @@ -2139,8 +2389,20 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *P return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2246,6 +2508,7 @@ type ProjectsZonesOperationsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Gets the specified operation. @@ -2283,8 +2546,20 @@ func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZ return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2389,6 +2664,7 @@ type ProjectsZonesOperationsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists all operations in a project in a specific zone or all @@ -2426,8 +2702,20 @@ func (c *ProjectsZonesOperationsListCall) Context(ctx context.Context) *Projects return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsZonesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) diff --git a/vendor/google.golang.org/api/dns/v1/dns-api.json b/vendor/google.golang.org/api/dns/v1/dns-api.json index 192deeaf7..38bdda5bd 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-api.json +++ b/vendor/google.golang.org/api/dns/v1/dns-api.json @@ -1,18 +1,18 @@ { "kind": "discovery#restDescription", - "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/ctEt-71wWAltEdgLnIcGLfJZeFE\"", + "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/RqBsQyB2YZT-ZAkK7pcLByI9SZs\"", "discoveryVersion": "v1", "id": "dns:v1", "name": "dns", "version": "v1", - "revision": "20160413", + "revision": "20161110", "title": "Google Cloud DNS API", "description": "Configures and serves authoritative DNS records.", "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" + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://developers.google.com/cloud-dns", "protocol": "rest", @@ -183,7 +183,7 @@ }, "name": { "type": "string", - "description": "User assigned name for this resource. Must be unique within the project. The name must be 1-32 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes." + "description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes." }, "nameServerSet": { "type": "string", diff --git a/vendor/google.golang.org/api/dns/v1/dns-gen.go b/vendor/google.golang.org/api/dns/v1/dns-gen.go index 4760eac60..fa66410d6 100644 --- a/vendor/google.golang.org/api/dns/v1/dns-gen.go +++ b/vendor/google.golang.org/api/dns/v1/dns-gen.go @@ -168,12 +168,20 @@ type Change struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Additions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Change) MarshalJSON() ([]byte, error) { type noMethod Change raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ChangesListResponse: The response to a request to enumerate Changes @@ -209,12 +217,20 @@ type ChangesListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Changes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ChangesListResponse) MarshalJSON() ([]byte, error) { type noMethod ChangesListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ManagedZone: A zone is a subtree of the DNS namespace under one @@ -243,7 +259,7 @@ type ManagedZone struct { Kind string `json:"kind,omitempty"` // Name: User assigned name for this resource. Must be unique within the - // project. The name must be 1-32 characters long, must begin with a + // project. The name must be 1-63 characters long, must begin with a // letter, end with a letter or digit, and only contain lowercase // letters, digits or dashes. Name string `json:"name,omitempty"` @@ -268,12 +284,20 @@ type ManagedZone struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ManagedZone) MarshalJSON() ([]byte, error) { type noMethod ManagedZone raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } type ManagedZonesListResponse struct { @@ -307,12 +331,20 @@ type ManagedZonesListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) { type noMethod ManagedZonesListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Project: A project resource. The project is a top level container for @@ -344,12 +376,20 @@ type Project struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Project) MarshalJSON() ([]byte, error) { type noMethod Project raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Quota: Limits associated with a Project. @@ -388,12 +428,20 @@ type Quota struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Quota) MarshalJSON() ([]byte, error) { type noMethod Quota raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ResourceRecordSet: A unit of data that will be returned by the DNS @@ -425,12 +473,20 @@ type ResourceRecordSet struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) { type noMethod ResourceRecordSet raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } type ResourceRecordSetsListResponse struct { @@ -464,12 +520,20 @@ type ResourceRecordSetsListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) { type noMethod ResourceRecordSetsListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // method id "dns.changes.create": @@ -481,6 +545,7 @@ type ChangesCreateCall struct { change *Change urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Create: Atomically update the ResourceRecordSet collection. @@ -508,8 +573,20 @@ func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChangesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.change) @@ -613,6 +690,7 @@ type ChangesGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Fetch the representation of an existing Change. @@ -650,8 +728,20 @@ func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChangesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -759,6 +849,7 @@ type ChangesListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Enumerate Changes to a ResourceRecordSet collection. @@ -828,8 +919,20 @@ func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChangesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -977,6 +1080,7 @@ type ManagedZonesCreateCall struct { managedzone *ManagedZone urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Create: Create a new ManagedZone. @@ -1003,8 +1107,20 @@ func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreat return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ManagedZonesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone) @@ -1098,6 +1214,7 @@ type ManagedZonesDeleteCall struct { managedZone string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Delete a previously created ManagedZone. @@ -1124,8 +1241,20 @@ func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDelet return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ManagedZonesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -1192,6 +1321,7 @@ type ManagedZonesGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Fetch the representation of an existing ManagedZone. @@ -1228,8 +1358,20 @@ func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ManagedZonesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1328,6 +1470,7 @@ type ManagedZonesListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Enumerate ManagedZones that have been created but not yet @@ -1387,8 +1530,20 @@ func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCal return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ManagedZonesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1516,6 +1671,7 @@ type ProjectsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Fetch the representation of an existing Project. @@ -1551,8 +1707,20 @@ func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1644,6 +1812,7 @@ type ResourceRecordSetsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Enumerate ResourceRecordSets that have been created but not yet @@ -1712,8 +1881,20 @@ func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecor return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourceRecordSetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) diff --git a/vendor/google.golang.org/api/gensupport/json.go b/vendor/google.golang.org/api/gensupport/json.go index dd7bcd2eb..53331b79b 100644 --- a/vendor/google.golang.org/api/gensupport/json.go +++ b/vendor/google.golang.org/api/gensupport/json.go @@ -12,13 +12,13 @@ import ( ) // MarshalJSON returns a JSON encoding of schema containing only selected fields. -// A field is selected if: -// * it has a non-empty value, or -// * its field name is present in forceSendFields, and -// * it is not a nil pointer or nil interface. +// A field is selected if any of the following is true: +// * it has a non-empty value +// * its field name is present in forceSendFields and it is not a nil pointer or nil interface +// * its field name is present in nullFields. // The JSON key for each selected field is taken from the field's json: struct tag. -func MarshalJSON(schema interface{}, forceSendFields []string) ([]byte, error) { - if len(forceSendFields) == 0 { +func MarshalJSON(schema interface{}, forceSendFields, nullFields []string) ([]byte, error) { + if len(forceSendFields) == 0 && len(nullFields) == 0 { return json.Marshal(schema) } @@ -26,15 +26,19 @@ func MarshalJSON(schema interface{}, forceSendFields []string) ([]byte, error) { for _, f := range forceSendFields { mustInclude[f] = struct{}{} } + useNull := make(map[string]struct{}) + for _, f := range nullFields { + useNull[f] = struct{}{} + } - dataMap, err := schemaToMap(schema, mustInclude) + dataMap, err := schemaToMap(schema, mustInclude, useNull) if err != nil { return nil, err } return json.Marshal(dataMap) } -func schemaToMap(schema interface{}, mustInclude map[string]struct{}) (map[string]interface{}, error) { +func schemaToMap(schema interface{}, mustInclude, useNull map[string]struct{}) (map[string]interface{}, error) { m := make(map[string]interface{}) s := reflect.ValueOf(schema) st := s.Type() @@ -54,6 +58,14 @@ func schemaToMap(schema interface{}, mustInclude map[string]struct{}) (map[strin v := s.Field(i) f := st.Field(i) + + if _, ok := useNull[f.Name]; ok { + if !isEmptyValue(v) { + return nil, fmt.Errorf("field %q in NullFields has non-empty value", f.Name) + } + m[tag.apiName] = nil + continue + } if !includeField(v, f, mustInclude) { continue } diff --git a/vendor/google.golang.org/api/gensupport/resumable.go b/vendor/google.golang.org/api/gensupport/resumable.go index fb133a841..dcd591f7f 100644 --- a/vendor/google.golang.org/api/gensupport/resumable.go +++ b/vendor/google.golang.org/api/gensupport/resumable.go @@ -5,6 +5,7 @@ package gensupport import ( + "errors" "fmt" "io" "net/http" @@ -12,14 +13,9 @@ import ( "time" "golang.org/x/net/context" - "golang.org/x/net/context/ctxhttp" ) const ( - // statusResumeIncomplete is the code returned by the Google uploader - // when the transfer is not yet complete. - statusResumeIncomplete = 308 - // statusTooManyRequests is returned by the storage API if the // per-project limits have been temporarily exceeded. The request // should be retried. @@ -80,11 +76,23 @@ func (rx *ResumableUpload) doUploadRequest(ctx context.Context, data io.Reader, req.Header.Set("Content-Range", contentRange) req.Header.Set("Content-Type", rx.MediaType) req.Header.Set("User-Agent", rx.UserAgent) - fn := Hook(ctx, req) - resp, err := ctxhttp.Do(ctx, rx.Client, req) - fn(resp) - return resp, err + // Google's upload endpoint uses status code 308 for a + // different purpose than the "308 Permanent Redirect" + // since-standardized in RFC 7238. Because of the conflict in + // semantics, Google added this new request header which + // causes it to not use "308" and instead reply with 200 OK + // and sets the upload-specific "X-HTTP-Status-Code-Override: + // 308" response header. + req.Header.Set("X-GUploader-No-308", "yes") + + return SendRequest(ctx, rx.Client, req) +} + +func statusResumeIncomplete(resp *http.Response) bool { + // This is how the server signals "status resume incomplete" + // when X-GUploader-No-308 is set to "yes": + return resp != nil && resp.Header.Get("X-Http-Status-Code-Override") == "308" } // reportProgress calls a user-supplied callback to report upload progress. @@ -115,11 +123,17 @@ func (rx *ResumableUpload) transferChunk(ctx context.Context) (*http.Response, e return res, err } - if res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK { + // We sent "X-GUploader-No-308: yes" (see comment elsewhere in + // this file), so we don't expect to get a 308. + if res.StatusCode == 308 { + return nil, errors.New("unexpected 308 response status code") + } + + if res.StatusCode == http.StatusOK { rx.reportProgress(off, off+int64(size)) } - if res.StatusCode == statusResumeIncomplete { + if statusResumeIncomplete(res) { rx.Media.Next() } return res, nil @@ -138,8 +152,8 @@ func contextDone(ctx context.Context) bool { // It retries using the provided back off strategy until cancelled or the // strategy indicates to stop retrying. // It is called from the auto-generated API code and is not visible to the user. -// Before sending an HTTP request, Upload calls Hook to obtain a function which -// it subsequently calls with the HTTP response. +// Before sending an HTTP request, Upload calls any registered hook functions, +// and calls the returned functions after the request returns (see send.go). // rx is private to the auto-generated API code. // Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) { @@ -181,7 +195,7 @@ func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err // If the chunk was uploaded successfully, but there's still // more to go, upload the next chunk without any delay. - if status == statusResumeIncomplete { + if statusResumeIncomplete(resp) { pause = 0 backoff.Reset() resp.Body.Close() diff --git a/vendor/google.golang.org/api/gensupport/retry.go b/vendor/google.golang.org/api/gensupport/retry.go index 7f83d1da9..9023368ac 100644 --- a/vendor/google.golang.org/api/gensupport/retry.go +++ b/vendor/google.golang.org/api/gensupport/retry.go @@ -55,23 +55,17 @@ func DefaultBackoffStrategy() BackoffStrategy { // shouldRetry returns true if the HTTP response / error indicates that the // request should be attempted again. func shouldRetry(status int, err error) bool { - // Retry for 5xx response codes. - if 500 <= status && status < 600 { + if 500 <= status && status <= 599 { return true } - - // Retry on statusTooManyRequests{ if status == statusTooManyRequests { return true } - - // Retry on unexpected EOFs and temporary network errors. if err == io.ErrUnexpectedEOF { return true } if err, ok := err.(net.Error); ok { return err.Temporary() } - return false } diff --git a/vendor/google.golang.org/api/gensupport/send.go b/vendor/google.golang.org/api/gensupport/send.go index 5b2727d72..3d22f638f 100644 --- a/vendor/google.golang.org/api/gensupport/send.go +++ b/vendor/google.golang.org/api/gensupport/send.go @@ -11,25 +11,45 @@ import ( "golang.org/x/net/context/ctxhttp" ) -// Hook is a function that is called once before each HTTP request that is sent -// by a generated API. It returns a function that is called after the request -// returns. -// Hook is never called if the context is nil. -var Hook func(ctx context.Context, req *http.Request) func(resp *http.Response) = defaultHook +// Hook is the type of a function that is called once before each HTTP request +// that is sent by a generated API. It returns a function that is called after +// the request returns. +// Hooks are not called if the context is nil. +type Hook func(ctx context.Context, req *http.Request) func(resp *http.Response) -func defaultHook(ctx context.Context, req *http.Request) func(resp *http.Response) { - return func(resp *http.Response) {} +var hooks []Hook + +// RegisterHook registers a Hook to be called before each HTTP request by a +// generated API. Hooks are called in the order they are registered. Each +// hook can return a function; if it is non-nil, it is called after the HTTP +// request returns. These functions are called in the reverse order. +// RegisterHook should not be called concurrently with itself or SendRequest. +func RegisterHook(h Hook) { + hooks = append(hooks, h) } // SendRequest sends a single HTTP request using the given client. -// If ctx is non-nil, uses ctxhttp.Do, and calls Hook beforehand. The function -// returned by Hook is called after the request returns. +// If ctx is non-nil, it calls all hooks, then sends the request with +// ctxhttp.Do, then calls any functions returned by the hooks in reverse order. func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if ctx != nil { - fn := Hook(ctx, req) - resp, err := ctxhttp.Do(ctx, client, req) - fn(resp) - return resp, err + if ctx == nil { + return client.Do(req) } - return client.Do(req) + // Call hooks in order of registration, store returned funcs. + post := make([]func(resp *http.Response), len(hooks)) + for i, h := range hooks { + fn := h(ctx, req) + post[i] = fn + } + + // Send request. + resp, err := ctxhttp.Do(ctx, client, req) + + // Call returned funcs in reverse order. + for i := len(post) - 1; i >= 0; i-- { + if fn := post[i]; fn != nil { + fn(resp) + } + } + return resp, err } diff --git a/vendor/google.golang.org/api/iam/v1/iam-api.json b/vendor/google.golang.org/api/iam/v1/iam-api.json index 68eb06ddf..c7bac1e04 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-api.json +++ b/vendor/google.golang.org/api/iam/v1/iam-api.json @@ -1,12 +1,13 @@ { "kind": "discovery#restDescription", - "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/KGIJuBPLol6TqL9arf5YOmp-wQ0\"", + "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/bQX0iw41CX8vYvVm7WSKLdyxMvI\"", "discoveryVersion": "v1", "id": "iam:v1", "name": "iam", + "canonicalName": "iam", "version": "v1", - "revision": "20160129", - "title": "Google Identity and Access Management API", + "revision": "20160915", + "title": "Google Identity and Access Management (IAM) API", "description": "Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.", "ownerDomain": "google.com", "ownerName": "Google", @@ -125,18 +126,18 @@ }, "nextPageToken": { "type": "string", - "description": "To retrieve the next page of results, set [ListServiceAccountsRequest.page_token] to this value." + "description": "To retrieve the next page of results, set ListServiceAccountsRequest.page_token to this value." } } }, "ServiceAccount": { "id": "ServiceAccount", "type": "object", - "description": "A service account in the Identity and Access Management API. To create a service account, you specify the project_id and account_id for the account. The account_id is unique within the project, and used to generate the service account email address and a stable unique id. All other methods can identify accounts using the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "A service account in the Identity and Access Management API. To create a service account, specify the `project_id` and the `account_id` for the account. The `account_id` is unique within the project, and is used to generate the service account email address and a stable `unique_id`. If the account already exists, the account's resource name is returned in util::Status's ResourceInfo.resource_name in the format of projects/{project}/serviceAccounts/{email}. The caller can use the name in other methods to access the account. All other methods can identify the service account using the format `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "properties": { "name": { "type": "string", - "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". In requests using '-' as a wildcard for the project, will infer the project from the account and the account value can be the email address or the unique_id of the service account. In responses the resource name will always be in the format \"projects/{project}/serviceAccounts/{email}\"." + "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`." }, "projectId": { "type": "string", @@ -144,11 +145,11 @@ }, "uniqueId": { "type": "string", - "description": "@OutputOnly unique and stable id of the service account." + "description": "@OutputOnly The unique and stable id of the service account." }, "email": { "type": "string", - "description": "@OutputOnly Email address of the service account." + "description": "@OutputOnly The email address of the service account." }, "displayName": { "type": "string", @@ -172,11 +173,11 @@ "properties": { "accountId": { "type": "string", - "description": "Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 1-63 characters long, and match the regular expression [a-z]([-a-z0-9]*[a-z0-9]) to comply with RFC1035." + "description": "Required. The account id that is used to generate the service account email address and a stable unique id. It is unique within a project, must be 6-30 characters long, and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035." }, "serviceAccount": { "$ref": "ServiceAccount", - "description": "The ServiceAccount resource to create. Currently, only the following values are user assignable: display_name ." + "description": "The ServiceAccount resource to create. Currently, only the following values are user assignable: `display_name` ." } } }, @@ -202,24 +203,38 @@ "ServiceAccountKey": { "id": "ServiceAccountKey", "type": "object", - "description": "Represents a service account key. A service account can have 0 or more key pairs. The private keys for these are not stored by Google. ServiceAccountKeys are immutable.", + "description": "Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed key-pairs are managed automatically by Google, and rotated daily without user intervention. The private key never leaves Google's servers to maximize security. Public keys for all service accounts are also published at the OAuth2 Service Account API.", "properties": { "name": { "type": "string", - "description": "The resource name of the service account key in the format \"projects/{project}/serviceAccounts/{email}/keys/{key}\"." + "description": "The resource name of the service account key in the following format `projects/{project}/serviceAccounts/{account}/keys/{key}`." }, "privateKeyType": { "type": "string", - "description": "The type of the private key.", + "description": "The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.", "enum": [ "TYPE_UNSPECIFIED", "TYPE_PKCS12_FILE", "TYPE_GOOGLE_CREDENTIALS_FILE" ] }, + "keyAlgorithm": { + "type": "string", + "description": "Specifies the algorithm (and possibly key size) for the key.", + "enum": [ + "KEY_ALG_UNSPECIFIED", + "KEY_ALG_RSA_1024", + "KEY_ALG_RSA_2048" + ] + }, "privateKeyData": { "type": "string", - "description": "The key data.", + "description": "The private key data. Only provided in `CreateServiceAccountKey` responses.", + "format": "byte" + }, + "publicKeyData": { + "type": "string", + "description": "The public key data. Only provided in `GetServiceAccountKey` responses.", "format": "byte" }, "validAfterTime": { @@ -239,12 +254,21 @@ "properties": { "privateKeyType": { "type": "string", - "description": "The type of the key requested. GOOGLE_CREDENTIALS is the default key type.", + "description": "The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the default output format.", "enum": [ "TYPE_UNSPECIFIED", "TYPE_PKCS12_FILE", "TYPE_GOOGLE_CREDENTIALS_FILE" ] + }, + "keyAlgorithm": { + "type": "string", + "description": "Which type of key and algorithm to use for the key. The default is currently a 4K RSA key. However this may change in the future.", + "enum": [ + "KEY_ALG_UNSPECIFIED", + "KEY_ALG_RSA_1024", + "KEY_ALG_RSA_2048" + ] } } }, @@ -255,7 +279,7 @@ "properties": { "bytesToSign": { "type": "string", - "description": "The bytes to sign", + "description": "The bytes to sign.", "format": "byte" } } @@ -279,7 +303,7 @@ "Policy": { "id": "Policy", "type": "object", - "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\"] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. **Example** { \"bindings\": [ { \"role\": \"roles/owner\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-other-app@appspot.gserviceaccount.com\", ] }, { \"role\": \"roles/viewer\", \"members\": [\"user:sean@example.com\"] } ] } For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).", "properties": { "version": { "type": "integer", @@ -293,12 +317,6 @@ "$ref": "Binding" } }, - "rules": { - "type": "array", - "items": { - "$ref": "Rule" - } - }, "etag": { "type": "string", "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.", @@ -324,162 +342,6 @@ } } }, - "Rule": { - "id": "Rule", - "type": "object", - "description": "A rule to be applied in a Policy.", - "properties": { - "description": { - "type": "string", - "description": "Human-readable description of the rule." - }, - "permissions": { - "type": "array", - "description": "A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.", - "items": { - "type": "string" - } - }, - "action": { - "type": "string", - "description": "Required", - "enum": [ - "NO_ACTION", - "ALLOW", - "ALLOW_WITH_LOG", - "DENY", - "DENY_WITH_LOG", - "LOG" - ] - }, - "in": { - "type": "array", - "description": "The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.", - "items": { - "type": "string" - } - }, - "notIn": { - "type": "array", - "description": "The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. The format for in and not_in entries is the same as for members in a Binding (see google/iam/v1/policy.proto).", - "items": { - "type": "string" - } - }, - "conditions": { - "type": "array", - "description": "Additional restrictions that must be met", - "items": { - "$ref": "Condition" - } - }, - "logConfig": { - "type": "array", - "description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.", - "items": { - "$ref": "LogConfig" - } - } - } - }, - "Condition": { - "id": "Condition", - "type": "object", - "description": "A condition to be met.", - "properties": { - "iam": { - "type": "string", - "description": "Trusted attributes supplied by the IAM system.", - "enum": [ - "NO_ATTR", - "AUTHORITY", - "ATTRIBUTION" - ] - }, - "sys": { - "type": "string", - "description": "Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.", - "enum": [ - "NO_ATTR", - "REGION", - "SERVICE", - "NAME", - "IP" - ] - }, - "svc": { - "type": "string", - "description": "Trusted attributes discharged by the service." - }, - "op": { - "type": "string", - "description": "An operator to apply the subject with.", - "enum": [ - "NO_OP", - "EQUALS", - "NOT_EQUALS", - "IN", - "NOT_IN", - "DISCHARGED" - ] - }, - "value": { - "type": "string", - "description": "The object of the condition. Exactly one of these must be set." - }, - "values": { - "type": "array", - "description": "The objects of the condition. This is mutually exclusive with 'value'.", - "items": { - "type": "string" - } - } - } - }, - "LogConfig": { - "id": "LogConfig", - "type": "object", - "description": "Specifies what kind of log the caller must write Increment a streamz counter with the specified metric and field names. Metric names should start with a '/', generally be lowercase-only, and end in \"_count\". Field names should not contain an initial slash. The actual exported metric names will have \"/iam/policy\" prepended. Field names correspond to IAM request parameters and field values are their respective values. At present only \"iam_principal\", corresponding to IAMContext.principal, is supported. Examples: counter { metric: \"/debug_access_count\" field: \"iam_principal\" } ==\u003e increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} At this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1", - "properties": { - "counter": { - "$ref": "CounterOptions", - "description": "Counter options." - }, - "dataAccess": { - "$ref": "DataAccessOptions", - "description": "Data access options." - }, - "cloudAudit": { - "$ref": "CloudAuditOptions", - "description": "Cloud audit options." - } - } - }, - "CounterOptions": { - "id": "CounterOptions", - "type": "object", - "description": "Options for counters", - "properties": { - "metric": { - "type": "string", - "description": "The metric to update." - }, - "field": { - "type": "string", - "description": "The field value to attribute." - } - } - }, - "DataAccessOptions": { - "id": "DataAccessOptions", - "type": "object", - "description": "Write a Data Access (Gin) log" - }, - "CloudAuditOptions": { - "id": "CloudAuditOptions", - "type": "object", - "description": "Write a Cloud Audit log" - }, "SetIamPolicyRequest": { "id": "SetIamPolicyRequest", "type": "object", @@ -498,7 +360,7 @@ "properties": { "permissions": { "type": "array", - "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.", + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", "items": { "type": "string" } @@ -518,6 +380,99 @@ } } } + }, + "QueryGrantableRolesRequest": { + "id": "QueryGrantableRolesRequest", + "type": "object", + "description": "The grantable role query request.", + "properties": { + "fullResourceName": { + "type": "string", + "description": "Required. The full resource name to query from the list of grantable roles. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`." + } + } + }, + "QueryGrantableRolesResponse": { + "id": "QueryGrantableRolesResponse", + "type": "object", + "description": "The grantable role query response.", + "properties": { + "roles": { + "type": "array", + "description": "The list of matching roles.", + "items": { + "$ref": "Role" + } + } + } + }, + "Role": { + "id": "Role", + "type": "object", + "description": "A role in the Identity and Access Management API.", + "properties": { + "name": { + "type": "string", + "description": "The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for curated roles and organizations/{organization-id}/roles/logging.viewer for custom roles." + }, + "title": { + "type": "string", + "description": "Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes." + }, + "description": { + "type": "string", + "description": "Optional. A human-readable description for the role." + } + } + }, + "AuditData": { + "id": "AuditData", + "type": "object", + "description": "Audit log information specific to Cloud IAM. This message is serialized as an `Any` type in the `ServiceData` message of an `AuditLog` message.", + "properties": { + "policyDelta": { + "$ref": "PolicyDelta", + "description": "Policy delta between the original policy and the newly set policy." + } + } + }, + "PolicyDelta": { + "id": "PolicyDelta", + "type": "object", + "description": "The difference delta between two policies.", + "properties": { + "bindingDeltas": { + "type": "array", + "description": "The delta for Bindings between two policies.", + "items": { + "$ref": "BindingDelta" + } + } + } + }, + "BindingDelta": { + "id": "BindingDelta", + "type": "object", + "description": "One delta entry for Binding. Each individual change (only one member in each entry) to a binding will be a separate entry.", + "properties": { + "action": { + "type": "string", + "description": "The action that was performed on a Binding. Required", + "enum": [ + "ACTION_UNSPECIFIED", + "ADD", + "REMOVE" + ] + }, + "role": { + "type": "string", + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required" + }, + "member": { + "type": "string", + "description": "A single identity requesting access for a Cloud Platform resource. Follows the same format of Binding.members. Required" + } + } } }, "resources": { @@ -529,24 +484,24 @@ "id": "iam.projects.serviceAccounts.list", "path": "v1/{+name}/serviceAccounts", "httpMethod": "GET", - "description": "Lists service accounts for a project.", + "description": "Lists ServiceAccounts for a project.", "parameters": { "name": { "type": "string", - "description": "Required. The resource name of the project associated with the service accounts, such as \"projects/123\"", + "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", "required": true, "pattern": "^projects/[^/]*$", "location": "path" }, "pageSize": { "type": "integer", - "description": "Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the [ListServiceAccountsResponse.next_page_token] in a subsequent request.", + "description": "Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next_page_token in a subsequent request.", "format": "int32", "location": "query" }, "pageToken": { "type": "string", - "description": "Optional pagination token returned in an earlier [ListServiceAccountsResponse.next_page_token].", + "description": "Optional pagination token returned in an earlier ListServiceAccountsResponse.next_page_token.", "location": "query" } }, @@ -564,11 +519,11 @@ "id": "iam.projects.serviceAccounts.get", "path": "v1/{+name}", "httpMethod": "GET", - "description": "Gets a ServiceAccount", + "description": "Gets a ServiceAccount.", "parameters": { "name": { "type": "string", - "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -588,11 +543,11 @@ "id": "iam.projects.serviceAccounts.create", "path": "v1/{+name}/serviceAccounts", "httpMethod": "POST", - "description": "Creates a service account and returns it.", + "description": "Creates a ServiceAccount and returns it.", "parameters": { "name": { "type": "string", - "description": "Required. The resource name of the project associated with the service accounts, such as \"projects/123\"", + "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", "required": true, "pattern": "^projects/[^/]*$", "location": "path" @@ -615,11 +570,11 @@ "id": "iam.projects.serviceAccounts.update", "path": "v1/{+name}", "httpMethod": "PUT", - "description": "Updates a service account. Currently, only the following fields are updatable: 'display_name' . The 'etag' is mandatory.", + "description": "Updates a ServiceAccount. Currently, only the following fields are updatable: `display_name` . The `etag` is mandatory.", "parameters": { "name": { "type": "string", - "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". In requests using '-' as a wildcard for the project, will infer the project from the account and the account value can be the email address or the unique_id of the service account. In responses the resource name will always be in the format \"projects/{project}/serviceAccounts/{email}\".", + "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -642,11 +597,11 @@ "id": "iam.projects.serviceAccounts.delete", "path": "v1/{+name}", "httpMethod": "DELETE", - "description": "Deletes a service acount.", + "description": "Deletes a ServiceAccount.", "parameters": { "name": { "type": "string", - "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -666,11 +621,11 @@ "id": "iam.projects.serviceAccounts.signBlob", "path": "v1/{+name}:signBlob", "httpMethod": "POST", - "description": "Signs a blob using a service account.", + "description": "Signs a blob using a service account's system-managed private key.", "parameters": { "name": { "type": "string", - "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -693,11 +648,11 @@ "id": "iam.projects.serviceAccounts.getIamPolicy", "path": "v1/{+resource}:getIamPolicy", "httpMethod": "POST", - "description": "Returns the IAM access control policy for specified IAM resource.", + "description": "Returns the IAM access control policy for a ServiceAccount.", "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -717,11 +672,11 @@ "id": "iam.projects.serviceAccounts.setIamPolicy", "path": "v1/{+resource}:setIamPolicy", "httpMethod": "POST", - "description": "Sets the IAM access control policy for the specified IAM resource.", + "description": "Sets the IAM access control policy for a ServiceAccount.", "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -744,11 +699,11 @@ "id": "iam.projects.serviceAccounts.testIamPermissions", "path": "v1/{+resource}:testIamPermissions", "httpMethod": "POST", - "description": "Tests the specified permissions against the IAM access control policy for the specified IAM resource.", + "description": "Tests the specified permissions against the IAM access control policy for a ServiceAccount.", "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -775,18 +730,18 @@ "id": "iam.projects.serviceAccounts.keys.list", "path": "v1/{+name}/keys", "httpMethod": "GET", - "description": "Lists service account keys", + "description": "Lists ServiceAccountKeys.", "parameters": { "name": { "type": "string", - "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project, will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" }, "keyTypes": { "type": "string", - "description": "The type of keys the user wants to list. If empty, all key types are included in the response. Duplicate key types are not allowed.", + "description": "Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned.", "enum": [ "KEY_TYPE_UNSPECIFIED", "USER_MANAGED", @@ -814,10 +769,20 @@ "parameters": { "name": { "type": "string", - "description": "The resource name of the service account key in the format \"projects/{project}/serviceAccounts/{account}/keys/{key}\". Using '-' as a wildcard for the project will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", "location": "path" + }, + "publicKeyType": { + "type": "string", + "description": "The output format of the public key requested. X509_PEM is the default output format.", + "enum": [ + "TYPE_NONE", + "TYPE_X509_PEM_FILE", + "TYPE_RAW_PUBLIC_KEY" + ], + "location": "query" } }, "parameterOrder": [ @@ -834,11 +799,11 @@ "id": "iam.projects.serviceAccounts.keys.create", "path": "v1/{+name}/keys", "httpMethod": "POST", - "description": "Creates a service account key and returns it.", + "description": "Creates a ServiceAccountKey and returns it.", "parameters": { "name": { "type": "string", - "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "location": "path" @@ -861,11 +826,11 @@ "id": "iam.projects.serviceAccounts.keys.delete", "path": "v1/{+name}", "httpMethod": "DELETE", - "description": "Deletes a service account key.", + "description": "Deletes a ServiceAccountKey.", "parameters": { "name": { "type": "string", - "description": "The resource name of the service account key in the format \"projects/{project}/serviceAccounts/{account}/keys/{key}\". Using '-' as a wildcard for the project will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + "description": "The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", "required": true, "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", "location": "path" @@ -886,6 +851,25 @@ } } } + }, + "roles": { + "methods": { + "queryGrantableRoles": { + "id": "iam.roles.queryGrantableRoles", + "path": "v1/roles:queryGrantableRoles", + "httpMethod": "POST", + "description": "Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource.", + "request": { + "$ref": "QueryGrantableRolesRequest" + }, + "response": { + "$ref": "QueryGrantableRolesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } diff --git a/vendor/google.golang.org/api/iam/v1/iam-gen.go b/vendor/google.golang.org/api/iam/v1/iam-gen.go index 9b788fddf..6bb880952 100644 --- a/vendor/google.golang.org/api/iam/v1/iam-gen.go +++ b/vendor/google.golang.org/api/iam/v1/iam-gen.go @@ -1,4 +1,4 @@ -// Package iam provides access to the Google Identity and Access Management API. +// Package iam provides access to the Google Identity and Access Management (IAM) API. // // See https://cloud.google.com/iam/ // @@ -57,6 +57,7 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Projects = NewProjectsService(s) + s.Roles = NewRolesService(s) return s, nil } @@ -66,6 +67,8 @@ type Service struct { UserAgent string // optional additional User-Agent fragment Projects *ProjectsService + + Roles *RolesService } func (s *Service) userAgent() string { @@ -108,6 +111,46 @@ type ProjectsServiceAccountsKeysService struct { s *Service } +func NewRolesService(s *Service) *RolesService { + rs := &RolesService{s: s} + return rs +} + +type RolesService struct { + s *Service +} + +// AuditData: Audit log information specific to Cloud IAM. This message +// is serialized as an `Any` type in the `ServiceData` message of an +// `AuditLog` message. +type AuditData struct { + // PolicyDelta: Policy delta between the original policy and the newly + // set policy. + PolicyDelta *PolicyDelta `json:"policyDelta,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PolicyDelta") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PolicyDelta") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AuditData) MarshalJSON() ([]byte, error) { + type noMethod AuditData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members` with a `role`. type Binding struct { // Members: Specifies the identities requesting access for a Cloud @@ -138,103 +181,80 @@ type Binding struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Members") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Binding) MarshalJSON() ([]byte, error) { type noMethod Binding raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CloudAuditOptions: Write a Cloud Audit log -type CloudAuditOptions struct { -} - -// Condition: A condition to be met. -type Condition struct { - // Iam: Trusted attributes supplied by the IAM system. +// BindingDelta: One delta entry for Binding. Each individual change +// (only one member in each entry) to a binding will be a separate +// entry. +type BindingDelta struct { + // Action: The action that was performed on a Binding. Required // // Possible values: - // "NO_ATTR" - // "AUTHORITY" - // "ATTRIBUTION" - Iam string `json:"iam,omitempty"` + // "ACTION_UNSPECIFIED" + // "ADD" + // "REMOVE" + Action string `json:"action,omitempty"` - // Op: An operator to apply the subject with. - // - // Possible values: - // "NO_OP" - // "EQUALS" - // "NOT_EQUALS" - // "IN" - // "NOT_IN" - // "DISCHARGED" - Op string `json:"op,omitempty"` + // Member: A single identity requesting access for a Cloud Platform + // resource. Follows the same format of Binding.members. Required + Member string `json:"member,omitempty"` - // Svc: Trusted attributes discharged by the service. - Svc string `json:"svc,omitempty"` + // Role: Role that is assigned to `members`. For example, + // `roles/viewer`, `roles/editor`, or `roles/owner`. Required + Role string `json:"role,omitempty"` - // Sys: Trusted attributes supplied by any service that owns resources - // and uses the IAM system for access control. - // - // Possible values: - // "NO_ATTR" - // "REGION" - // "SERVICE" - // "NAME" - // "IP" - Sys string `json:"sys,omitempty"` - - // Value: The object of the condition. Exactly one of these must be set. - Value string `json:"value,omitempty"` - - // Values: The objects of the condition. This is mutually exclusive with - // 'value'. - Values []string `json:"values,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Iam") to + // ForceSendFields is a list of field names (e.g. "Action") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } -func (s *Condition) MarshalJSON() ([]byte, error) { - type noMethod Condition +func (s *BindingDelta) MarshalJSON() ([]byte, error) { + type noMethod BindingDelta raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) -} - -// CounterOptions: Options for counters -type CounterOptions struct { - // Field: The field value to attribute. - Field string `json:"field,omitempty"` - - // Metric: The metric to update. - Metric string `json:"metric,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Field") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` -} - -func (s *CounterOptions) MarshalJSON() ([]byte, error) { - type noMethod CounterOptions - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // CreateServiceAccountKeyRequest: The service account key create // request. type CreateServiceAccountKeyRequest struct { - // PrivateKeyType: The type of the key requested. GOOGLE_CREDENTIALS is - // the default key type. + // KeyAlgorithm: Which type of key and algorithm to use for the key. The + // default is currently a 4K RSA key. However this may change in the + // future. + // + // Possible values: + // "KEY_ALG_UNSPECIFIED" + // "KEY_ALG_RSA_1024" + // "KEY_ALG_RSA_2048" + KeyAlgorithm string `json:"keyAlgorithm,omitempty"` + + // PrivateKeyType: The output format of the private key. + // `GOOGLE_CREDENTIALS_FILE` is the default output format. // // Possible values: // "TYPE_UNSPECIFIED" @@ -242,31 +262,39 @@ type CreateServiceAccountKeyRequest struct { // "TYPE_GOOGLE_CREDENTIALS_FILE" PrivateKeyType string `json:"privateKeyType,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrivateKeyType") to + // ForceSendFields is a list of field names (e.g. "KeyAlgorithm") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KeyAlgorithm") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *CreateServiceAccountKeyRequest) MarshalJSON() ([]byte, error) { type noMethod CreateServiceAccountKeyRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // CreateServiceAccountRequest: The service account create request. type CreateServiceAccountRequest struct { // AccountId: Required. The account id that is used to generate the // service account email address and a stable unique id. It is unique - // within a project, must be 1-63 characters long, and match the regular - // expression [a-z]([-a-z0-9]*[a-z0-9]) to comply with RFC1035. + // within a project, must be 6-30 characters long, and match the regular + // expression `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. AccountId string `json:"accountId,omitempty"` // ServiceAccount: The ServiceAccount resource to create. Currently, - // only the following values are user assignable: display_name . + // only the following values are user assignable: `display_name` . ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` // ForceSendFields is a list of field names (e.g. "AccountId") to @@ -276,16 +304,20 @@ type CreateServiceAccountRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccountId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *CreateServiceAccountRequest) MarshalJSON() ([]byte, error) { type noMethod CreateServiceAccountRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) -} - -// DataAccessOptions: Write a Data Access (Gin) log -type DataAccessOptions struct { + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Empty: A generic empty message that you can re-use to avoid defining @@ -317,12 +349,20 @@ type ListServiceAccountKeysResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Keys") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListServiceAccountKeysResponse) MarshalJSON() ([]byte, error) { type noMethod ListServiceAccountKeysResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ListServiceAccountsResponse: The service account list response. @@ -331,7 +371,7 @@ type ListServiceAccountsResponse struct { Accounts []*ServiceAccount `json:"accounts,omitempty"` // NextPageToken: To retrieve the next page of results, set - // [ListServiceAccountsRequest.page_token] to this value. + // ListServiceAccountsRequest.page_token to this value. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -345,50 +385,20 @@ type ListServiceAccountsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Accounts") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListServiceAccountsResponse) MarshalJSON() ([]byte, error) { type noMethod ListServiceAccountsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) -} - -// LogConfig: Specifies what kind of log the caller must write Increment -// a streamz counter with the specified metric and field names. Metric -// names should start with a '/', generally be lowercase-only, and end -// in "_count". Field names should not contain an initial slash. The -// actual exported metric names will have "/iam/policy" prepended. Field -// names correspond to IAM request parameters and field values are their -// respective values. At present only "iam_principal", corresponding to -// IAMContext.principal, is supported. Examples: counter { metric: -// "/debug_access_count" field: "iam_principal" } ==> increment counter -// /iam/policy/backend_debug_access_count {iam_principal=[value of -// IAMContext.principal]} At this time we do not support: * multiple -// field names (though this may be supported in the future) * -// decrementing the counter * incrementing it by anything other than 1 -type LogConfig struct { - // CloudAudit: Cloud audit options. - CloudAudit *CloudAuditOptions `json:"cloudAudit,omitempty"` - - // Counter: Counter options. - Counter *CounterOptions `json:"counter,omitempty"` - - // DataAccess: Data access options. - DataAccess *DataAccessOptions `json:"dataAccess,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CloudAudit") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` -} - -func (s *LogConfig) MarshalJSON() ([]byte, error) { - type noMethod LogConfig - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Policy: Defines an Identity and Access Management (IAM) policy. It is @@ -399,7 +409,7 @@ func (s *LogConfig) MarshalJSON() ([]byte, error) { // named list of permissions defined by IAM. **Example** { "bindings": [ // { "role": "roles/owner", "members": [ "user:mike@example.com", // "group:admins@example.com", "domain:google.com", -// "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { +// "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { // "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } // For a description of IAM and its features, see the [IAM developer's // guide](https://cloud.google.com/iam). @@ -421,8 +431,6 @@ type Policy struct { // blindly. Etag string `json:"etag,omitempty"` - Rules []*Rule `json:"rules,omitempty"` - // Version: Version of the `Policy`. The default version is 0. Version int64 `json:"version,omitempty"` @@ -437,93 +445,187 @@ type Policy struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bindings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Policy) MarshalJSON() ([]byte, error) { type noMethod Policy raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Rule: A rule to be applied in a Policy. -type Rule struct { - // Action: Required - // - // Possible values: - // "NO_ACTION" - // "ALLOW" - // "ALLOW_WITH_LOG" - // "DENY" - // "DENY_WITH_LOG" - // "LOG" - Action string `json:"action,omitempty"` +// PolicyDelta: The difference delta between two policies. +type PolicyDelta struct { + // BindingDeltas: The delta for Bindings between two policies. + BindingDeltas []*BindingDelta `json:"bindingDeltas,omitempty"` - // Conditions: Additional restrictions that must be met - Conditions []*Condition `json:"conditions,omitempty"` - - // Description: Human-readable description of the rule. - Description string `json:"description,omitempty"` - - // In: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this - // set of entries. - In []string `json:"in,omitempty"` - - // LogConfig: The config returned to callers of tech.iam.IAM.CheckPolicy - // for any entries that match the LOG action. - LogConfig []*LogConfig `json:"logConfig,omitempty"` - - // NotIn: The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in - // this set of entries. The format for in and not_in entries is the same - // as for members in a Binding (see google/iam/v1/policy.proto). - NotIn []string `json:"notIn,omitempty"` - - // Permissions: A permission is a string of form '..' (e.g., - // 'storage.buckets.list'). A value of '*' matches all permissions, and - // a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - Permissions []string `json:"permissions,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Action") to + // ForceSendFields is a list of field names (e.g. "BindingDeltas") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BindingDeltas") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } -func (s *Rule) MarshalJSON() ([]byte, error) { - type noMethod Rule +func (s *PolicyDelta) MarshalJSON() ([]byte, error) { + type noMethod PolicyDelta raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueryGrantableRolesRequest: The grantable role query request. +type QueryGrantableRolesRequest struct { + // FullResourceName: Required. The full resource name to query from the + // list of grantable roles. The name follows the Google Cloud Platform + // resource format. For example, a Cloud Platform project with id + // `my-project` will be named + // `//cloudresourcemanager.googleapis.com/projects/my-project`. + FullResourceName string `json:"fullResourceName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullResourceName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FullResourceName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *QueryGrantableRolesRequest) MarshalJSON() ([]byte, error) { + type noMethod QueryGrantableRolesRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueryGrantableRolesResponse: The grantable role query response. +type QueryGrantableRolesResponse struct { + // Roles: The list of matching roles. + Roles []*Role `json:"roles,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Roles") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Roles") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueryGrantableRolesResponse) MarshalJSON() ([]byte, error) { + type noMethod QueryGrantableRolesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Role: A role in the Identity and Access Management API. +type Role struct { + // Description: Optional. A human-readable description for the role. + Description string `json:"description,omitempty"` + + // Name: The name of the role. When Role is used in CreateRole, the role + // name must not be set. When Role is used in output and other input + // such as UpdateRole, the role name is the complete path, e.g., + // roles/logging.viewer for curated roles and + // organizations/{organization-id}/roles/logging.viewer for custom + // roles. + Name string `json:"name,omitempty"` + + // Title: Optional. A human-readable title for the role. Typically this + // is limited to 100 UTF-8 bytes. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Role) MarshalJSON() ([]byte, error) { + type noMethod Role + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ServiceAccount: A service account in the Identity and Access -// Management API. To create a service account, you specify the -// project_id and account_id for the account. The account_id is unique -// within the project, and used to generate the service account email -// address and a stable unique id. All other methods can identify -// accounts using the format -// "projects/{project}/serviceAccounts/{account}". Using '-' as a -// wildcard for the project, will infer the project from the account. -// The account value can be the email address or the unique_id of the +// Management API. To create a service account, specify the `project_id` +// and the `account_id` for the account. The `account_id` is unique +// within the project, and is used to generate the service account email +// address and a stable `unique_id`. If the account already exists, the +// account's resource name is returned in util::Status's +// ResourceInfo.resource_name in the format of +// projects/{project}/serviceAccounts/{email}. The caller can use the +// name in other methods to access the account. All other methods can +// identify the service account using the format +// `projects/{project}/serviceAccounts/{account}`. Using `-` as a +// wildcard for the project will infer the project from the account. The +// `account` value can be the `email` address or the `unique_id` of the // service account. type ServiceAccount struct { // DisplayName: Optional. A user-specified description of the service // account. Must be fewer than 100 UTF-8 bytes. DisplayName string `json:"displayName,omitempty"` - // Email: @OutputOnly Email address of the service account. + // Email: @OutputOnly The email address of the service account. Email string `json:"email,omitempty"` // Etag: Used to perform a consistent read-modify-write. Etag string `json:"etag,omitempty"` - // Name: The resource name of the service account in the format - // "projects/{project}/serviceAccounts/{account}". In requests using '-' - // as a wildcard for the project, will infer the project from the - // account and the account value can be the email address or the - // unique_id of the service account. In responses the resource name will - // always be in the format "projects/{project}/serviceAccounts/{email}". + // Name: The resource name of the service account in the following + // format: `projects/{project}/serviceAccounts/{account}`. Requests + // using `-` as a wildcard for the project will infer the project from + // the `account` and the `account` value can be the `email` address or + // the `unique_id` of the service account. In responses the resource + // name will always be in the format + // `projects/{project}/serviceAccounts/{email}`. Name string `json:"name,omitempty"` // Oauth2ClientId: @OutputOnly. The OAuth2 client id for the service @@ -536,7 +638,8 @@ type ServiceAccount struct { // account. ProjectId string `json:"projectId,omitempty"` - // UniqueId: @OutputOnly unique and stable id of the service account. + // UniqueId: @OutputOnly The unique and stable id of the service + // account. UniqueId string `json:"uniqueId,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -550,26 +653,55 @@ type ServiceAccount struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ServiceAccount) MarshalJSON() ([]byte, error) { type noMethod ServiceAccount raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ServiceAccountKey: Represents a service account key. A service -// account can have 0 or more key pairs. The private keys for these are -// not stored by Google. ServiceAccountKeys are immutable. +// account has two sets of key-pairs: user-managed, and system-managed. +// User-managed key-pairs can be created and deleted by users. Users are +// responsible for rotating these keys periodically to ensure security +// of their service accounts. Users retain the private key of these +// key-pairs, and Google retains ONLY the public key. System-managed +// key-pairs are managed automatically by Google, and rotated daily +// without user intervention. The private key never leaves Google's +// servers to maximize security. Public keys for all service accounts +// are also published at the OAuth2 Service Account API. type ServiceAccountKey struct { - // Name: The resource name of the service account key in the format - // "projects/{project}/serviceAccounts/{email}/keys/{key}". + // KeyAlgorithm: Specifies the algorithm (and possibly key size) for the + // key. + // + // Possible values: + // "KEY_ALG_UNSPECIFIED" + // "KEY_ALG_RSA_1024" + // "KEY_ALG_RSA_2048" + KeyAlgorithm string `json:"keyAlgorithm,omitempty"` + + // Name: The resource name of the service account key in the following + // format `projects/{project}/serviceAccounts/{account}/keys/{key}`. Name string `json:"name,omitempty"` - // PrivateKeyData: The key data. + // PrivateKeyData: The private key data. Only provided in + // `CreateServiceAccountKey` responses. PrivateKeyData string `json:"privateKeyData,omitempty"` - // PrivateKeyType: The type of the private key. + // PrivateKeyType: The output format for the private key. Only provided + // in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` + // or `ListServiceAccountKey` responses. Google never exposes + // system-managed private keys, and never retains user-managed private + // keys. // // Possible values: // "TYPE_UNSPECIFIED" @@ -577,6 +709,10 @@ type ServiceAccountKey struct { // "TYPE_GOOGLE_CREDENTIALS_FILE" PrivateKeyType string `json:"privateKeyType,omitempty"` + // PublicKeyData: The public key data. Only provided in + // `GetServiceAccountKey` responses. + PublicKeyData string `json:"publicKeyData,omitempty"` + // ValidAfterTime: The key can be used after this timestamp. ValidAfterTime string `json:"validAfterTime,omitempty"` @@ -587,19 +723,27 @@ type ServiceAccountKey struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "KeyAlgorithm") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KeyAlgorithm") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ServiceAccountKey) MarshalJSON() ([]byte, error) { type noMethod ServiceAccountKey raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SetIamPolicyRequest: Request message for `SetIamPolicy` method. @@ -617,17 +761,25 @@ type SetIamPolicyRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { type noMethod SetIamPolicyRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SignBlobRequest: The service account sign blob request. type SignBlobRequest struct { - // BytesToSign: The bytes to sign + // BytesToSign: The bytes to sign. BytesToSign string `json:"bytesToSign,omitempty"` // ForceSendFields is a list of field names (e.g. "BytesToSign") to @@ -637,12 +789,20 @@ type SignBlobRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BytesToSign") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SignBlobRequest) MarshalJSON() ([]byte, error) { type noMethod SignBlobRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SignBlobResponse: The service account sign blob response. @@ -664,12 +824,20 @@ type SignBlobResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KeyId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SignBlobResponse) MarshalJSON() ([]byte, error) { type noMethod SignBlobResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // TestIamPermissionsRequest: Request message for `TestIamPermissions` @@ -677,7 +845,8 @@ func (s *SignBlobResponse) MarshalJSON() ([]byte, error) { type TestIamPermissionsRequest struct { // Permissions: The set of permissions to check for the `resource`. // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. For more information see IAM Overview. + // allowed. For more information see [IAM + // Overview](https://cloud.google.com/iam/docs/overview#permissions). Permissions []string `json:"permissions,omitempty"` // ForceSendFields is a list of field names (e.g. "Permissions") to @@ -687,12 +856,20 @@ type TestIamPermissionsRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { type noMethod TestIamPermissionsRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // TestIamPermissionsResponse: Response message for `TestIamPermissions` @@ -713,12 +890,20 @@ type TestIamPermissionsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { type noMethod TestIamPermissionsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // method id "iam.projects.serviceAccounts.create": @@ -729,9 +914,10 @@ type ProjectsServiceAccountsCreateCall struct { createserviceaccountrequest *CreateServiceAccountRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Create: Creates a service account and returns it. +// Create: Creates a ServiceAccount and returns it. func (r *ProjectsServiceAccountsService) Create(name string, createserviceaccountrequest *CreateServiceAccountRequest) *ProjectsServiceAccountsCreateCall { c := &ProjectsServiceAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -755,26 +941,36 @@ func (c *ProjectsServiceAccountsCreateCall) Context(ctx context.Context) *Projec return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.createserviceaccountrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/serviceAccounts") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.create" call. @@ -809,12 +1005,13 @@ func (c *ProjectsServiceAccountsCreateCall) Do(opts ...googleapi.CallOption) (*S HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Creates a service account and returns it.", + // "description": "Creates a ServiceAccount and returns it.", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.create", // "parameterOrder": [ @@ -822,7 +1019,7 @@ func (c *ProjectsServiceAccountsCreateCall) Do(opts ...googleapi.CallOption) (*S // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the project associated with the service accounts, such as \"projects/123\"", + // "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", // "location": "path", // "pattern": "^projects/[^/]*$", // "required": true, @@ -850,9 +1047,10 @@ type ProjectsServiceAccountsDeleteCall struct { name string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Delete: Deletes a service acount. +// Delete: Deletes a ServiceAccount. func (r *ProjectsServiceAccountsService) Delete(name string) *ProjectsServiceAccountsDeleteCall { c := &ProjectsServiceAccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -875,20 +1073,31 @@ func (c *ProjectsServiceAccountsDeleteCall) Context(ctx context.Context) *Projec return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.delete" call. @@ -923,12 +1132,13 @@ func (c *ProjectsServiceAccountsDeleteCall) Do(opts ...googleapi.CallOption) (*E HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Deletes a service acount.", + // "description": "Deletes a ServiceAccount.", // "httpMethod": "DELETE", // "id": "iam.projects.serviceAccounts.delete", // "parameterOrder": [ @@ -936,7 +1146,7 @@ func (c *ProjectsServiceAccountsDeleteCall) Do(opts ...googleapi.CallOption) (*E // ], // "parameters": { // "name": { - // "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + // "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -962,9 +1172,10 @@ type ProjectsServiceAccountsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } -// Get: Gets a ServiceAccount +// Get: Gets a ServiceAccount. func (r *ProjectsServiceAccountsService) Get(name string) *ProjectsServiceAccountsGetCall { c := &ProjectsServiceAccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -997,23 +1208,34 @@ func (c *ProjectsServiceAccountsGetCall) Context(ctx context.Context) *ProjectsS return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - req.Header.Set("If-None-Match", c.ifNoneMatch_) - } - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.get" call. @@ -1048,12 +1270,13 @@ func (c *ProjectsServiceAccountsGetCall) Do(opts ...googleapi.CallOption) (*Serv HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Gets a ServiceAccount", + // "description": "Gets a ServiceAccount.", // "httpMethod": "GET", // "id": "iam.projects.serviceAccounts.get", // "parameterOrder": [ @@ -1061,7 +1284,7 @@ func (c *ProjectsServiceAccountsGetCall) Do(opts ...googleapi.CallOption) (*Serv // ], // "parameters": { // "name": { - // "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + // "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -1086,10 +1309,11 @@ type ProjectsServiceAccountsGetIamPolicyCall struct { resource string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Returns the IAM access control policy for specified IAM -// resource. +// GetIamPolicy: Returns the IAM access control policy for a +// ServiceAccount. func (r *ProjectsServiceAccountsService) GetIamPolicy(resource string) *ProjectsServiceAccountsGetIamPolicyCall { c := &ProjectsServiceAccountsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -1112,20 +1336,31 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Context(ctx context.Context) * return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.getIamPolicy" call. @@ -1160,12 +1395,13 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOptio HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Returns the IAM access control policy for specified IAM resource.", + // "description": "Returns the IAM access control policy for a ServiceAccount.", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.getIamPolicy", // "parameterOrder": [ @@ -1173,7 +1409,7 @@ func (c *ProjectsServiceAccountsGetIamPolicyCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -1199,9 +1435,10 @@ type ProjectsServiceAccountsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } -// List: Lists service accounts for a project. +// List: Lists ServiceAccounts for a project. func (r *ProjectsServiceAccountsService) List(name string) *ProjectsServiceAccountsListCall { c := &ProjectsServiceAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1211,8 +1448,7 @@ func (r *ProjectsServiceAccountsService) List(name string) *ProjectsServiceAccou // PageSize sets the optional parameter "pageSize": Optional limit on // the number of service accounts to include in the response. Further // accounts can subsequently be obtained by including the -// [ListServiceAccountsResponse.next_page_token] in a subsequent -// request. +// ListServiceAccountsResponse.next_page_token in a subsequent request. func (c *ProjectsServiceAccountsListCall) PageSize(pageSize int64) *ProjectsServiceAccountsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -1220,7 +1456,7 @@ func (c *ProjectsServiceAccountsListCall) PageSize(pageSize int64) *ProjectsServ // PageToken sets the optional parameter "pageToken": Optional // pagination token returned in an earlier -// [ListServiceAccountsResponse.next_page_token]. +// ListServiceAccountsResponse.next_page_token. func (c *ProjectsServiceAccountsListCall) PageToken(pageToken string) *ProjectsServiceAccountsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -1252,23 +1488,34 @@ func (c *ProjectsServiceAccountsListCall) Context(ctx context.Context) *Projects return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/serviceAccounts") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - req.Header.Set("If-None-Match", c.ifNoneMatch_) - } - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.list" call. @@ -1303,12 +1550,13 @@ func (c *ProjectsServiceAccountsListCall) Do(opts ...googleapi.CallOption) (*Lis HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Lists service accounts for a project.", + // "description": "Lists ServiceAccounts for a project.", // "httpMethod": "GET", // "id": "iam.projects.serviceAccounts.list", // "parameterOrder": [ @@ -1316,20 +1564,20 @@ func (c *ProjectsServiceAccountsListCall) Do(opts ...googleapi.CallOption) (*Lis // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the project associated with the service accounts, such as \"projects/123\"", + // "description": "Required. The resource name of the project associated with the service accounts, such as `projects/my-project-123`.", // "location": "path", // "pattern": "^projects/[^/]*$", // "required": true, // "type": "string" // }, // "pageSize": { - // "description": "Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the [ListServiceAccountsResponse.next_page_token] in a subsequent request.", + // "description": "Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next_page_token in a subsequent request.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional pagination token returned in an earlier [ListServiceAccountsResponse.next_page_token].", + // "description": "Optional pagination token returned in an earlier ListServiceAccountsResponse.next_page_token.", // "location": "query", // "type": "string" // } @@ -1374,10 +1622,11 @@ type ProjectsServiceAccountsSetIamPolicyCall struct { setiampolicyrequest *SetIamPolicyRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the IAM access control policy for the specified -// IAM resource. +// SetIamPolicy: Sets the IAM access control policy for a +// ServiceAccount. func (r *ProjectsServiceAccountsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsServiceAccountsSetIamPolicyCall { c := &ProjectsServiceAccountsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -1401,26 +1650,36 @@ func (c *ProjectsServiceAccountsSetIamPolicyCall) Context(ctx context.Context) * return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.setIamPolicy" call. @@ -1455,12 +1714,13 @@ func (c *ProjectsServiceAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOptio HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Sets the IAM access control policy for the specified IAM resource.", + // "description": "Sets the IAM access control policy for a ServiceAccount.", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.setIamPolicy", // "parameterOrder": [ @@ -1468,7 +1728,7 @@ func (c *ProjectsServiceAccountsSetIamPolicyCall) Do(opts ...googleapi.CallOptio // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -1497,9 +1757,11 @@ type ProjectsServiceAccountsSignBlobCall struct { signblobrequest *SignBlobRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// SignBlob: Signs a blob using a service account. +// SignBlob: Signs a blob using a service account's system-managed +// private key. func (r *ProjectsServiceAccountsService) SignBlob(name string, signblobrequest *SignBlobRequest) *ProjectsServiceAccountsSignBlobCall { c := &ProjectsServiceAccountsSignBlobCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1523,26 +1785,36 @@ func (c *ProjectsServiceAccountsSignBlobCall) Context(ctx context.Context) *Proj return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsSignBlobCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsSignBlobCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.signblobrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:signBlob") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.signBlob" call. @@ -1577,12 +1849,13 @@ func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) ( HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Signs a blob using a service account.", + // "description": "Signs a blob using a service account's system-managed private key.", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.signBlob", // "parameterOrder": [ @@ -1590,7 +1863,7 @@ func (c *ProjectsServiceAccountsSignBlobCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "name": { - // "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + // "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -1619,10 +1892,11 @@ type ProjectsServiceAccountsTestIamPermissionsCall struct { testiampermissionsrequest *TestIamPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // TestIamPermissions: Tests the specified permissions against the IAM -// access control policy for the specified IAM resource. +// access control policy for a ServiceAccount. func (r *ProjectsServiceAccountsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsServiceAccountsTestIamPermissionsCall { c := &ProjectsServiceAccountsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -1646,26 +1920,36 @@ func (c *ProjectsServiceAccountsTestIamPermissionsCall) Context(ctx context.Cont return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "resource": c.resource, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.testIamPermissions" call. @@ -1700,12 +1984,13 @@ func (c *ProjectsServiceAccountsTestIamPermissionsCall) Do(opts ...googleapi.Cal HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Tests the specified permissions against the IAM access control policy for the specified IAM resource.", + // "description": "Tests the specified permissions against the IAM access control policy for a ServiceAccount.", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.testIamPermissions", // "parameterOrder": [ @@ -1713,7 +1998,7 @@ func (c *ProjectsServiceAccountsTestIamPermissionsCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -1742,10 +2027,11 @@ type ProjectsServiceAccountsUpdateCall struct { serviceaccount *ServiceAccount urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Update: Updates a service account. Currently, only the following -// fields are updatable: 'display_name' . The 'etag' is mandatory. +// Update: Updates a ServiceAccount. Currently, only the following +// fields are updatable: `display_name` . The `etag` is mandatory. func (r *ProjectsServiceAccountsService) Update(name string, serviceaccount *ServiceAccount) *ProjectsServiceAccountsUpdateCall { c := &ProjectsServiceAccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1769,26 +2055,36 @@ func (c *ProjectsServiceAccountsUpdateCall) Context(ctx context.Context) *Projec return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceaccount) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("PUT", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.update" call. @@ -1823,12 +2119,13 @@ func (c *ProjectsServiceAccountsUpdateCall) Do(opts ...googleapi.CallOption) (*S HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Updates a service account. Currently, only the following fields are updatable: 'display_name' . The 'etag' is mandatory.", + // "description": "Updates a ServiceAccount. Currently, only the following fields are updatable: `display_name` . The `etag` is mandatory.", // "httpMethod": "PUT", // "id": "iam.projects.serviceAccounts.update", // "parameterOrder": [ @@ -1836,7 +2133,7 @@ func (c *ProjectsServiceAccountsUpdateCall) Do(opts ...googleapi.CallOption) (*S // ], // "parameters": { // "name": { - // "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". In requests using '-' as a wildcard for the project, will infer the project from the account and the account value can be the email address or the unique_id of the service account. In responses the resource name will always be in the format \"projects/{project}/serviceAccounts/{email}\".", + // "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/{project}/serviceAccounts/{email}`.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -1865,9 +2162,10 @@ type ProjectsServiceAccountsKeysCreateCall struct { createserviceaccountkeyrequest *CreateServiceAccountKeyRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Create: Creates a service account key and returns it. +// Create: Creates a ServiceAccountKey and returns it. func (r *ProjectsServiceAccountsKeysService) Create(name string, createserviceaccountkeyrequest *CreateServiceAccountKeyRequest) *ProjectsServiceAccountsKeysCreateCall { c := &ProjectsServiceAccountsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -1891,26 +2189,36 @@ func (c *ProjectsServiceAccountsKeysCreateCall) Context(ctx context.Context) *Pr return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsKeysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsKeysCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.createserviceaccountkeyrequest) if err != nil { return nil, err } - ctype := "application/json" + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/keys") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("Content-Type", ctype) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.keys.create" call. @@ -1945,12 +2253,13 @@ func (c *ProjectsServiceAccountsKeysCreateCall) Do(opts ...googleapi.CallOption) HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Creates a service account key and returns it.", + // "description": "Creates a ServiceAccountKey and returns it.", // "httpMethod": "POST", // "id": "iam.projects.serviceAccounts.keys.create", // "parameterOrder": [ @@ -1958,7 +2267,7 @@ func (c *ProjectsServiceAccountsKeysCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + // "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -1986,9 +2295,10 @@ type ProjectsServiceAccountsKeysDeleteCall struct { name string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Delete: Deletes a service account key. +// Delete: Deletes a ServiceAccountKey. func (r *ProjectsServiceAccountsKeysService) Delete(name string) *ProjectsServiceAccountsKeysDeleteCall { c := &ProjectsServiceAccountsKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2011,20 +2321,31 @@ func (c *ProjectsServiceAccountsKeysDeleteCall) Context(ctx context.Context) *Pr return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsKeysDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsKeysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.keys.delete" call. @@ -2059,12 +2380,13 @@ func (c *ProjectsServiceAccountsKeysDeleteCall) Do(opts ...googleapi.CallOption) HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Deletes a service account key.", + // "description": "Deletes a ServiceAccountKey.", // "httpMethod": "DELETE", // "id": "iam.projects.serviceAccounts.keys.delete", // "parameterOrder": [ @@ -2072,7 +2394,7 @@ func (c *ProjectsServiceAccountsKeysDeleteCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "The resource name of the service account key in the format \"projects/{project}/serviceAccounts/{account}/keys/{key}\". Using '-' as a wildcard for the project will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + // "description": "The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", // "required": true, @@ -2098,6 +2420,7 @@ type ProjectsServiceAccountsKeysGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Gets the ServiceAccountKey by key id. @@ -2107,6 +2430,19 @@ func (r *ProjectsServiceAccountsKeysService) Get(name string) *ProjectsServiceAc return c } +// PublicKeyType sets the optional parameter "publicKeyType": The output +// format of the public key requested. X509_PEM is the default output +// format. +// +// Possible values: +// "TYPE_NONE" +// "TYPE_X509_PEM_FILE" +// "TYPE_RAW_PUBLIC_KEY" +func (c *ProjectsServiceAccountsKeysGetCall) PublicKeyType(publicKeyType string) *ProjectsServiceAccountsKeysGetCall { + c.urlParams_.Set("publicKeyType", publicKeyType) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -2133,23 +2469,34 @@ func (c *ProjectsServiceAccountsKeysGetCall) Context(ctx context.Context) *Proje return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsKeysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsKeysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - req.Header.Set("If-None-Match", c.ifNoneMatch_) - } - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.keys.get" call. @@ -2184,7 +2531,8 @@ func (c *ProjectsServiceAccountsKeysGetCall) Do(opts ...googleapi.CallOption) (* HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil @@ -2197,11 +2545,21 @@ func (c *ProjectsServiceAccountsKeysGetCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "The resource name of the service account key in the format \"projects/{project}/serviceAccounts/{account}/keys/{key}\". Using '-' as a wildcard for the project will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + // "description": "The resource name of the service account key in the following format: `projects/{project}/serviceAccounts/{account}/keys/{key}`. Using `-` as a wildcard for the project will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", // "required": true, // "type": "string" + // }, + // "publicKeyType": { + // "description": "The output format of the public key requested. X509_PEM is the default output format.", + // "enum": [ + // "TYPE_NONE", + // "TYPE_X509_PEM_FILE", + // "TYPE_RAW_PUBLIC_KEY" + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", @@ -2223,18 +2581,20 @@ type ProjectsServiceAccountsKeysListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } -// List: Lists service account keys +// List: Lists ServiceAccountKeys. func (r *ProjectsServiceAccountsKeysService) List(name string) *ProjectsServiceAccountsKeysListCall { c := &ProjectsServiceAccountsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// KeyTypes sets the optional parameter "keyTypes": The type of keys the -// user wants to list. If empty, all key types are included in the -// response. Duplicate key types are not allowed. +// KeyTypes sets the optional parameter "keyTypes": Filters the types of +// keys the user wants to include in the list response. Duplicate key +// types are not allowed. If no key type is provided, all keys are +// returned. // // Possible values: // "KEY_TYPE_UNSPECIFIED" @@ -2271,23 +2631,34 @@ func (c *ProjectsServiceAccountsKeysListCall) Context(ctx context.Context) *Proj return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsServiceAccountsKeysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsServiceAccountsKeysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/keys") urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "name": c.name, }) - req.Header.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - req.Header.Set("If-None-Match", c.ifNoneMatch_) - } - if c.ctx_ != nil { - return ctxhttp.Do(c.ctx_, c.s.client, req) - } - return c.s.client.Do(req) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } // Do executes the "iam.projects.serviceAccounts.keys.list" call. @@ -2322,12 +2693,13 @@ func (c *ProjectsServiceAccountsKeysListCall) Do(opts ...googleapi.CallOption) ( HTTPStatusCode: res.StatusCode, }, } - if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { return nil, err } return ret, nil // { - // "description": "Lists service account keys", + // "description": "Lists ServiceAccountKeys.", // "httpMethod": "GET", // "id": "iam.projects.serviceAccounts.keys.list", // "parameterOrder": [ @@ -2335,7 +2707,7 @@ func (c *ProjectsServiceAccountsKeysListCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "keyTypes": { - // "description": "The type of keys the user wants to list. If empty, all key types are included in the response. Duplicate key types are not allowed.", + // "description": "Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned.", // "enum": [ // "KEY_TYPE_UNSPECIFIED", // "USER_MANAGED", @@ -2346,7 +2718,7 @@ func (c *ProjectsServiceAccountsKeysListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "name": { - // "description": "The resource name of the service account in the format \"projects/{project}/serviceAccounts/{account}\". Using '-' as a wildcard for the project, will infer the project from the account. The account value can be the email address or the unique_id of the service account.", + // "description": "The resource name of the service account in the following format: `projects/{project}/serviceAccounts/{account}`. Using `-` as a wildcard for the project, will infer the project from the account. The `account` value can be the `email` address or the `unique_id` of the service account.", // "location": "path", // "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", // "required": true, @@ -2363,3 +2735,122 @@ func (c *ProjectsServiceAccountsKeysListCall) Do(opts ...googleapi.CallOption) ( // } } + +// method id "iam.roles.queryGrantableRoles": + +type RolesQueryGrantableRolesCall struct { + s *Service + querygrantablerolesrequest *QueryGrantableRolesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// QueryGrantableRoles: Queries roles that can be granted on a +// particular resource. A role is grantable if it can be used as the +// role in a binding for a policy for that resource. +func (r *RolesService) QueryGrantableRoles(querygrantablerolesrequest *QueryGrantableRolesRequest) *RolesQueryGrantableRolesCall { + c := &RolesQueryGrantableRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.querygrantablerolesrequest = querygrantablerolesrequest + 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 *RolesQueryGrantableRolesCall) Fields(s ...googleapi.Field) *RolesQueryGrantableRolesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RolesQueryGrantableRolesCall) Context(ctx context.Context) *RolesQueryGrantableRolesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RolesQueryGrantableRolesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RolesQueryGrantableRolesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.querygrantablerolesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/roles:queryGrantableRoles") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "iam.roles.queryGrantableRoles" call. +// Exactly one of *QueryGrantableRolesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *QueryGrantableRolesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RolesQueryGrantableRolesCall) Do(opts ...googleapi.CallOption) (*QueryGrantableRolesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &QueryGrantableRolesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource.", + // "httpMethod": "POST", + // "id": "iam.roles.queryGrantableRoles", + // "path": "v1/roles:queryGrantableRoles", + // "request": { + // "$ref": "QueryGrantableRolesRequest" + // }, + // "response": { + // "$ref": "QueryGrantableRolesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json b/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json index c18125b16..48a95d7b9 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/liyzgLngirW3xU7Tt2Pd1AnSK1c\"", + "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/HIsdIvCDXEirzqtPtZbE0wV3MKA\"", "discoveryVersion": "v1", "id": "pubsub:v1", "name": "pubsub", "version": "v1", - "revision": "20160317", + "revision": "20161003", "title": "Google Cloud Pub/Sub API", "description": "Provides reliable, many-to-many, asynchronous messaging between applications.", "ownerDomain": "google.com", @@ -173,7 +173,7 @@ "properties": { "permissions": { "type": "array", - "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview.", + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", "items": { "type": "string" } @@ -226,7 +226,7 @@ "properties": { "data": { "type": "string", - "description": "The message payload. For JSON requests, the value of this field must be base64-encoded.", + "description": "The message payload. For JSON requests, the value of this field must be [base64-encoded](https://tools.ietf.org/html/rfc4648).", "format": "byte" }, "attributes": { @@ -320,7 +320,7 @@ }, "ackDeadlineSeconds": { "type": "integer", - "description": "This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using pull. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used.", + "description": "This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is 0, a default value of 10 seconds is used.", "format": "int32" } } @@ -464,7 +464,7 @@ "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/topics/[^/]*$", "location": "path" @@ -488,11 +488,11 @@ "id": "pubsub.projects.topics.getIamPolicy", "path": "v1/{+resource}:getIamPolicy", "httpMethod": "GET", - "description": "Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set.", + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/topics/[^/]*$", "location": "path" @@ -517,7 +517,7 @@ "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/topics/[^/]*$", "location": "path" @@ -733,7 +733,7 @@ "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/subscriptions/[^/]*$", "location": "path" @@ -757,11 +757,11 @@ "id": "pubsub.projects.subscriptions.getIamPolicy", "path": "v1/{+resource}:getIamPolicy", "httpMethod": "GET", - "description": "Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set.", + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/subscriptions/[^/]*$", "location": "path" @@ -786,7 +786,7 @@ "parameters": { "resource": { "type": "string", - "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", "required": true, "pattern": "^projects/[^/]*/subscriptions/[^/]*$", "location": "path" @@ -810,7 +810,7 @@ "id": "pubsub.projects.subscriptions.create", "path": "v1/{+name}", "httpMethod": "PUT", - "description": "Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.", + "description": "Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. Note that for REST API requests, you must specify a name.", "parameters": { "name": { "type": "string", @@ -899,7 +899,7 @@ "id": "pubsub.projects.subscriptions.delete", "path": "v1/{+subscription}", "httpMethod": "DELETE", - "description": "Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.", + "description": "Deletes an existing subscription. All messages retained in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription or its topic unless the same topic is specified.", "parameters": { "subscription": { "type": "string", @@ -924,7 +924,7 @@ "id": "pubsub.projects.subscriptions.modifyAckDeadline", "path": "v1/{+subscription}:modifyAckDeadline", "httpMethod": "POST", - "description": "Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.", + "description": "Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages.", "parameters": { "subscription": { "type": "string", @@ -1033,6 +1033,91 @@ ] } } + }, + "snapshots": { + "methods": { + "setIamPolicy": { + "id": "pubsub.projects.snapshots.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "parameters": { + "resource": { + "type": "string", + "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + "required": true, + "pattern": "^projects/[^/]*/snapshots/[^/]*$", + "location": "path" + } + }, + "parameterOrder": [ + "resource" + ], + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + }, + "getIamPolicy": { + "id": "pubsub.projects.snapshots.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "httpMethod": "GET", + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "parameters": { + "resource": { + "type": "string", + "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + "required": true, + "pattern": "^projects/[^/]*/snapshots/[^/]*$", + "location": "path" + } + }, + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + }, + "testIamPermissions": { + "id": "pubsub.projects.snapshots.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "resource": { + "type": "string", + "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + "required": true, + "pattern": "^projects/[^/]*/snapshots/[^/]*$", + "location": "path" + } + }, + "parameterOrder": [ + "resource" + ], + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/pubsub" + ] + } + } } } } diff --git a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go index cbe24f1fa..391fde30a 100644 --- a/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go +++ b/vendor/google.golang.org/api/pubsub/v1/pubsub-gen.go @@ -80,6 +80,7 @@ func (s *Service) userAgent() string { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} + rs.Snapshots = NewProjectsSnapshotsService(s) rs.Subscriptions = NewProjectsSubscriptionsService(s) rs.Topics = NewProjectsTopicsService(s) return rs @@ -88,11 +89,22 @@ func NewProjectsService(s *Service) *ProjectsService { type ProjectsService struct { s *Service + Snapshots *ProjectsSnapshotsService + Subscriptions *ProjectsSubscriptionsService Topics *ProjectsTopicsService } +func NewProjectsSnapshotsService(s *Service) *ProjectsSnapshotsService { + rs := &ProjectsSnapshotsService{s: s} + return rs +} + +type ProjectsSnapshotsService struct { + s *Service +} + func NewProjectsSubscriptionsService(s *Service) *ProjectsSubscriptionsService { rs := &ProjectsSubscriptionsService{s: s} return rs @@ -137,12 +149,20 @@ type AcknowledgeRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AckIds") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *AcknowledgeRequest) MarshalJSON() ([]byte, error) { type noMethod AcknowledgeRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Binding: Associates `members` with a `role`. @@ -175,12 +195,20 @@ type Binding struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Members") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Binding) MarshalJSON() ([]byte, error) { type noMethod Binding raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Empty: A generic empty message that you can re-use to avoid defining @@ -217,12 +245,20 @@ type ListSubscriptionsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { type noMethod ListSubscriptionsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ListTopicSubscriptionsResponse: Response for the @@ -247,12 +283,20 @@ type ListTopicSubscriptionsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListTopicSubscriptionsResponse) MarshalJSON() ([]byte, error) { type noMethod ListTopicSubscriptionsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ListTopicsResponse: Response for the `ListTopics` method. @@ -276,12 +320,20 @@ type ListTopicsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ListTopicsResponse) MarshalJSON() ([]byte, error) { type noMethod ListTopicsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ModifyAckDeadlineRequest: Request for the ModifyAckDeadline method. @@ -303,12 +355,21 @@ type ModifyAckDeadlineRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AckDeadlineSeconds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ModifyAckDeadlineRequest) MarshalJSON() ([]byte, error) { type noMethod ModifyAckDeadlineRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ModifyPushConfigRequest: Request for the ModifyPushConfig method. @@ -327,12 +388,20 @@ type ModifyPushConfigRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PushConfig") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ModifyPushConfigRequest) MarshalJSON() ([]byte, error) { type noMethod ModifyPushConfigRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Policy: Defines an Identity and Access Management (IAM) policy. It is @@ -379,12 +448,20 @@ type Policy struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bindings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Policy) MarshalJSON() ([]byte, error) { type noMethod Policy raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // PublishRequest: Request for the Publish method. @@ -399,12 +476,20 @@ type PublishRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Messages") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *PublishRequest) MarshalJSON() ([]byte, error) { type noMethod PublishRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // PublishResponse: Response for the `Publish` method. @@ -425,12 +510,20 @@ type PublishResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MessageIds") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *PublishResponse) MarshalJSON() ([]byte, error) { type noMethod PublishResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // PubsubMessage: A message data and its attributes. The message payload @@ -441,7 +534,7 @@ type PubsubMessage struct { Attributes map[string]string `json:"attributes,omitempty"` // Data: The message payload. For JSON requests, the value of this field - // must be base64-encoded. + // must be [base64-encoded](https://tools.ietf.org/html/rfc4648). Data string `json:"data,omitempty"` // MessageId: ID of this message, assigned by the server when the @@ -463,12 +556,20 @@ type PubsubMessage struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *PubsubMessage) MarshalJSON() ([]byte, error) { type noMethod PubsubMessage raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // PullRequest: Request for the `Pull` method. @@ -493,12 +594,20 @@ type PullRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxMessages") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *PullRequest) MarshalJSON() ([]byte, error) { type noMethod PullRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // PullResponse: Response for the `Pull` method. @@ -520,12 +629,21 @@ type PullResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReceivedMessages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *PullResponse) MarshalJSON() ([]byte, error) { type noMethod PullResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // PushConfig: Configuration for a push delivery endpoint. @@ -559,12 +677,20 @@ type PushConfig struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *PushConfig) MarshalJSON() ([]byte, error) { type noMethod PushConfig raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ReceivedMessage: A message and its corresponding acknowledgment ID. @@ -582,12 +708,20 @@ type ReceivedMessage struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AckId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ReceivedMessage) MarshalJSON() ([]byte, error) { type noMethod ReceivedMessage raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SetIamPolicyRequest: Request message for `SetIamPolicy` method. @@ -605,12 +739,20 @@ type SetIamPolicyRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { type noMethod SetIamPolicyRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Subscription: A subscription resource. @@ -623,10 +765,11 @@ type Subscription struct { // basis). For pull subscriptions, this value is used as the initial // value for the ack deadline. To override this value for a given // message, call `ModifyAckDeadline` with the corresponding `ack_id` if - // using pull. For push delivery, this value is also used to set the - // request timeout for the call to the push endpoint. If the subscriber - // never acknowledges the message, the Pub/Sub system will eventually - // redeliver the message. If this parameter is not set, the default + // using pull. The maximum custom deadline you can specify is 600 + // seconds (10 minutes). For push delivery, this value is also used to + // set the request timeout for the call to the push endpoint. If the + // subscriber never acknowledges the message, the Pub/Sub system will + // eventually redeliver the message. If this parameter is 0, a default // value of 10 seconds is used. AckDeadlineSeconds int64 `json:"ackDeadlineSeconds,omitempty"` @@ -659,12 +802,21 @@ type Subscription struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AckDeadlineSeconds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *Subscription) MarshalJSON() ([]byte, error) { type noMethod Subscription raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // TestIamPermissionsRequest: Request message for `TestIamPermissions` @@ -672,7 +824,8 @@ func (s *Subscription) MarshalJSON() ([]byte, error) { type TestIamPermissionsRequest struct { // Permissions: The set of permissions to check for the `resource`. // Permissions with wildcards (such as '*' or 'storage.*') are not - // allowed. For more information see IAM Overview. + // allowed. For more information see [IAM + // Overview](https://cloud.google.com/iam/docs/overview#permissions). Permissions []string `json:"permissions,omitempty"` // ForceSendFields is a list of field names (e.g. "Permissions") to @@ -682,12 +835,20 @@ type TestIamPermissionsRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { type noMethod TestIamPermissionsRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // TestIamPermissionsResponse: Response message for `TestIamPermissions` @@ -708,12 +869,20 @@ type TestIamPermissionsResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { type noMethod TestIamPermissionsResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Topic: A topic resource. @@ -737,12 +906,433 @@ type Topic struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Topic) MarshalJSON() ([]byte, error) { type noMethod Topic raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "pubsub.projects.snapshots.getIamPolicy": + +type ProjectsSnapshotsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +func (r *ProjectsSnapshotsService) GetIamPolicy(resource string) *ProjectsSnapshotsGetIamPolicyCall { + c := &ProjectsSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + 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 *ProjectsSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsSnapshotsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSnapshotsGetIamPolicyCall) Context(ctx context.Context) *ProjectsSnapshotsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSnapshotsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "pubsub.projects.snapshots.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsSnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "httpMethod": "GET", + // "id": "pubsub.projects.snapshots.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + // "location": "path", + // "pattern": "^projects/[^/]*/snapshots/[^/]*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/pubsub" + // ] + // } + +} + +// method id "pubsub.projects.snapshots.setIamPolicy": + +type ProjectsSnapshotsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. +func (r *ProjectsSnapshotsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsSnapshotsSetIamPolicyCall { + c := &ProjectsSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSnapshotsSetIamPolicyCall) Context(ctx context.Context) *ProjectsSnapshotsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSnapshotsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "pubsub.projects.snapshots.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "httpMethod": "POST", + // "id": "pubsub.projects.snapshots.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + // "location": "path", + // "pattern": "^projects/[^/]*/snapshots/[^/]*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/pubsub" + // ] + // } + +} + +// method id "pubsub.projects.snapshots.testIamPermissions": + +type ProjectsSnapshotsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *ProjectsSnapshotsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsSnapshotsTestIamPermissionsCall { + c := &ProjectsSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsSnapshotsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSnapshotsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "pubsub.projects.snapshots.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "pubsub.projects.snapshots.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", + // "location": "path", + // "pattern": "^projects/[^/]*/snapshots/[^/]*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/pubsub" + // ] + // } + } // method id "pubsub.projects.subscriptions.acknowledge": @@ -753,6 +1343,7 @@ type ProjectsSubscriptionsAcknowledgeCall struct { acknowledgerequest *AcknowledgeRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Acknowledge: Acknowledges the messages associated with the `ack_ids` @@ -784,8 +1375,20 @@ func (c *ProjectsSubscriptionsAcknowledgeCall) Context(ctx context.Context) *Pro return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsAcknowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsAcknowledgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.acknowledgerequest) @@ -880,13 +1483,15 @@ type ProjectsSubscriptionsCreateCall struct { subscription *Subscription urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Create: Creates a subscription to a given topic. If the subscription // already exists, returns `ALREADY_EXISTS`. If the corresponding topic // doesn't exist, returns `NOT_FOUND`. If the name is not provided in // the request, the server will assign a random name for this -// subscription on the same project as the topic. +// subscription on the same project as the topic. Note that for REST API +// requests, you must specify a name. func (r *ProjectsSubscriptionsService) Create(name string, subscription *Subscription) *ProjectsSubscriptionsCreateCall { c := &ProjectsSubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -910,8 +1515,20 @@ func (c *ProjectsSubscriptionsCreateCall) Context(ctx context.Context) *Projects return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription) @@ -968,7 +1585,7 @@ func (c *ProjectsSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*Sub } return ret, nil // { - // "description": "Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.", + // "description": "Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. Note that for REST API requests, you must specify a name.", // "httpMethod": "PUT", // "id": "pubsub.projects.subscriptions.create", // "parameterOrder": [ @@ -1005,14 +1622,15 @@ type ProjectsSubscriptionsDeleteCall struct { subscription string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Delete: Deletes an existing subscription. All pending messages in the -// subscription are immediately dropped. Calls to `Pull` after deletion -// will return `NOT_FOUND`. After a subscription is deleted, a new one -// may be created with the same name, but the new one has no association -// with the old subscription, or its topic unless the same topic is -// specified. +// Delete: Deletes an existing subscription. All messages retained in +// the subscription are immediately dropped. Calls to `Pull` after +// deletion will return `NOT_FOUND`. After a subscription is deleted, a +// new one may be created with the same name, but the new one has no +// association with the old subscription or its topic unless the same +// topic is specified. func (r *ProjectsSubscriptionsService) Delete(subscription string) *ProjectsSubscriptionsDeleteCall { c := &ProjectsSubscriptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.subscription = subscription @@ -1035,8 +1653,20 @@ func (c *ProjectsSubscriptionsDeleteCall) Context(ctx context.Context) *Projects return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -1088,7 +1718,7 @@ func (c *ProjectsSubscriptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Emp } return ret, nil // { - // "description": "Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.", + // "description": "Deletes an existing subscription. All messages retained in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription or its topic unless the same topic is specified.", // "httpMethod": "DELETE", // "id": "pubsub.projects.subscriptions.delete", // "parameterOrder": [ @@ -1123,6 +1753,7 @@ type ProjectsSubscriptionsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Gets the configuration details of a subscription. @@ -1158,8 +1789,20 @@ func (c *ProjectsSubscriptionsGetCall) Context(ctx context.Context) *ProjectsSub return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1249,11 +1892,12 @@ type ProjectsSubscriptionsGetIamPolicyCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a `resource`. -// Returns an empty policy if the resource exists and does not have a -// policy set. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. func (r *ProjectsSubscriptionsService) GetIamPolicy(resource string) *ProjectsSubscriptionsGetIamPolicyCall { c := &ProjectsSubscriptionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -1286,8 +1930,20 @@ func (c *ProjectsSubscriptionsGetIamPolicyCall) Context(ctx context.Context) *Pr return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1342,7 +1998,7 @@ func (c *ProjectsSubscriptionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set.", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", // "httpMethod": "GET", // "id": "pubsub.projects.subscriptions.getIamPolicy", // "parameterOrder": [ @@ -1350,7 +2006,7 @@ func (c *ProjectsSubscriptionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/subscriptions/[^/]*$", // "required": true, @@ -1377,6 +2033,7 @@ type ProjectsSubscriptionsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists matching subscriptions. @@ -1428,8 +2085,20 @@ func (c *ProjectsSubscriptionsListCall) Context(ctx context.Context) *ProjectsSu return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1551,12 +2220,15 @@ type ProjectsSubscriptionsModifyAckDeadlineCall struct { modifyackdeadlinerequest *ModifyAckDeadlineRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // ModifyAckDeadline: Modifies the ack deadline for a specific message. // This method is useful to indicate that more time is needed to process // a message by the subscriber, or to make the message available for -// redelivery if the processing was interrupted. +// redelivery if the processing was interrupted. Note that this does not +// modify the subscription-level `ackDeadlineSeconds` used for +// subsequent messages. func (r *ProjectsSubscriptionsService) ModifyAckDeadline(subscription string, modifyackdeadlinerequest *ModifyAckDeadlineRequest) *ProjectsSubscriptionsModifyAckDeadlineCall { c := &ProjectsSubscriptionsModifyAckDeadlineCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.subscription = subscription @@ -1580,8 +2252,20 @@ func (c *ProjectsSubscriptionsModifyAckDeadlineCall) Context(ctx context.Context return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsModifyAckDeadlineCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsModifyAckDeadlineCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifyackdeadlinerequest) @@ -1638,7 +2322,7 @@ func (c *ProjectsSubscriptionsModifyAckDeadlineCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.", + // "description": "Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages.", // "httpMethod": "POST", // "id": "pubsub.projects.subscriptions.modifyAckDeadline", // "parameterOrder": [ @@ -1676,6 +2360,7 @@ type ProjectsSubscriptionsModifyPushConfigCall struct { modifypushconfigrequest *ModifyPushConfigRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // ModifyPushConfig: Modifies the `PushConfig` for a specified @@ -1707,8 +2392,20 @@ func (c *ProjectsSubscriptionsModifyPushConfigCall) Context(ctx context.Context) return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsModifyPushConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsModifyPushConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifypushconfigrequest) @@ -1803,6 +2500,7 @@ type ProjectsSubscriptionsPullCall struct { pullrequest *PullRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Pull: Pulls messages from the server. Returns an empty list if there @@ -1832,8 +2530,20 @@ func (c *ProjectsSubscriptionsPullCall) Context(ctx context.Context) *ProjectsSu return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsPullCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsPullCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.pullrequest) @@ -1928,6 +2638,7 @@ type ProjectsSubscriptionsSetIamPolicyCall struct { setiampolicyrequest *SetIamPolicyRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // SetIamPolicy: Sets the access control policy on the specified @@ -1955,8 +2666,20 @@ func (c *ProjectsSubscriptionsSetIamPolicyCall) Context(ctx context.Context) *Pr return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) @@ -2021,7 +2744,7 @@ func (c *ProjectsSubscriptionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/subscriptions/[^/]*$", // "required": true, @@ -2051,6 +2774,7 @@ type ProjectsSubscriptionsTestIamPermissionsCall struct { testiampermissionsrequest *TestIamPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // TestIamPermissions: Returns permissions that a caller has on the @@ -2078,8 +2802,20 @@ func (c *ProjectsSubscriptionsTestIamPermissionsCall) Context(ctx context.Contex return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSubscriptionsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsSubscriptionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) @@ -2144,7 +2880,7 @@ func (c *ProjectsSubscriptionsTestIamPermissionsCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/subscriptions/[^/]*$", // "required": true, @@ -2174,6 +2910,7 @@ type ProjectsTopicsCreateCall struct { topic *Topic urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Create: Creates the given topic with the given name. @@ -2200,8 +2937,20 @@ func (c *ProjectsTopicsCreateCall) Context(ctx context.Context) *ProjectsTopicsC return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.topic) @@ -2295,6 +3044,7 @@ type ProjectsTopicsDeleteCall struct { topic string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes the topic with the given name. Returns `NOT_FOUND` if @@ -2325,8 +3075,20 @@ func (c *ProjectsTopicsDeleteCall) Context(ctx context.Context) *ProjectsTopicsD return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -2413,6 +3175,7 @@ type ProjectsTopicsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Gets the configuration of a topic. @@ -2448,8 +3211,20 @@ func (c *ProjectsTopicsGetCall) Context(ctx context.Context) *ProjectsTopicsGetC return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2539,11 +3314,12 @@ type ProjectsTopicsGetIamPolicyCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a `resource`. -// Returns an empty policy if the resource exists and does not have a -// policy set. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. func (r *ProjectsTopicsService) GetIamPolicy(resource string) *ProjectsTopicsGetIamPolicyCall { c := &ProjectsTopicsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -2576,8 +3352,20 @@ func (c *ProjectsTopicsGetIamPolicyCall) Context(ctx context.Context) *ProjectsT return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2632,7 +3420,7 @@ func (c *ProjectsTopicsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli } return ret, nil // { - // "description": "Gets the access control policy for a `resource`. Returns an empty policy if the resource exists and does not have a policy set.", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", // "httpMethod": "GET", // "id": "pubsub.projects.topics.getIamPolicy", // "parameterOrder": [ @@ -2640,7 +3428,7 @@ func (c *ProjectsTopicsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `getIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/topics/[^/]*$", // "required": true, @@ -2667,6 +3455,7 @@ type ProjectsTopicsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists matching topics. @@ -2718,8 +3507,20 @@ func (c *ProjectsTopicsListCall) Context(ctx context.Context) *ProjectsTopicsLis return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2841,6 +3642,7 @@ type ProjectsTopicsPublishCall struct { publishrequest *PublishRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Publish: Adds one or more messages to the topic. Returns `NOT_FOUND` @@ -2870,8 +3672,20 @@ func (c *ProjectsTopicsPublishCall) Context(ctx context.Context) *ProjectsTopics return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsPublishCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsPublishCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishrequest) @@ -2966,6 +3780,7 @@ type ProjectsTopicsSetIamPolicyCall struct { setiampolicyrequest *SetIamPolicyRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // SetIamPolicy: Sets the access control policy on the specified @@ -2993,8 +3808,20 @@ func (c *ProjectsTopicsSetIamPolicyCall) Context(ctx context.Context) *ProjectsT return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) @@ -3059,7 +3886,7 @@ func (c *ProjectsTopicsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Poli // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `setIamPolicy` documentation.", + // "description": "REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/topics/[^/]*$", // "required": true, @@ -3089,6 +3916,7 @@ type ProjectsTopicsTestIamPermissionsCall struct { testiampermissionsrequest *TestIamPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // TestIamPermissions: Returns permissions that a caller has on the @@ -3116,8 +3944,20 @@ func (c *ProjectsTopicsTestIamPermissionsCall) Context(ctx context.Context) *Pro return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) @@ -3182,7 +4022,7 @@ func (c *ProjectsTopicsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*disk*`. The format for the path specified in this value is resource specific and is specified in the `testIamPermissions` documentation.", + // "description": "REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`.", // "location": "path", // "pattern": "^projects/[^/]*/topics/[^/]*$", // "required": true, @@ -3212,6 +4052,7 @@ type ProjectsTopicsSubscriptionsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists the name of the subscriptions for this topic. @@ -3263,8 +4104,20 @@ func (c *ProjectsTopicsSubscriptionsListCall) Context(ctx context.Context) *Proj return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsTopicsSubscriptionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ProjectsTopicsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) diff --git a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json index 5a044492f..8e769815e 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-api.json @@ -1,19 +1,19 @@ { "kind": "discovery#restDescription", - "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/Bw6HlPfCUqTIhF647hFuWCHD0c8\"", + "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/0q1bgr0rR6WxzzPOS6Rfltu7D84\"", "discoveryVersion": "v1", "id": "sqladmin:v1beta4", "name": "sqladmin", "canonicalName": "SQL Admin", "version": "v1beta4", - "revision": "20160712", + "revision": "20161115", "title": "Cloud SQL Administration API", "description": "Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.", "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" + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/sql/docs/reference/latest", "protocol": "rest", @@ -333,6 +333,10 @@ "type": "string", "description": "FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container.\nSECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM.\nEXTERNAL: A MySQL server that is not managed by Google." }, + "connectionName": { + "type": "string", + "description": "Connection name of the Cloud SQL instance used in connection strings." + }, "currentDiskSize": { "type": "string", "description": "The current disk usage of the instance in bytes. This property has been deprecated. Users should use the \"cloudsql.googleapis.com/database/disk/bytes_used\" metric in Cloud Monitoring API instead. Please see https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details.", @@ -767,6 +771,10 @@ "type": "string", "description": "The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired.", "format": "date-time" + }, + "type": { + "type": "string", + "description": "The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported." } } }, @@ -1307,7 +1315,7 @@ }, "region": { "type": "array", - "description": "The applicable regions for this tier. Can be us-east1, europe-west1 or asia-east1.", + "description": "The applicable regions for this tier.", "items": { "type": "string" } @@ -1482,7 +1490,7 @@ "id": "sql.backupRuns.insert", "path": "projects/{project}/instances/{instance}/backupRuns", "httpMethod": "POST", - "description": "Creates a new backup run on demand.", + "description": "Creates a new backup run on demand. This method is applicable only to Second Generation instances.", "parameters": { "instance": { "type": "string", @@ -1506,7 +1514,11 @@ }, "response": { "$ref": "Operation" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sqlservice.admin" + ] }, "list": { "id": "sql.backupRuns.list", diff --git a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go index 616f8073f..7b2280850 100644 --- a/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go +++ b/vendor/google.golang.org/api/sqladmin/v1beta4/sqladmin-gen.go @@ -193,12 +193,21 @@ type AclEntry struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpirationTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *AclEntry) MarshalJSON() ([]byte, error) { type noMethod AclEntry raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BackupConfiguration: Database instance backup configuration. @@ -224,12 +233,21 @@ type BackupConfiguration struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryLogEnabled") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *BackupConfiguration) MarshalJSON() ([]byte, error) { type noMethod BackupConfiguration raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BackupRun: A database instance backup run resource. @@ -289,12 +307,20 @@ type BackupRun struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BackupRun) MarshalJSON() ([]byte, error) { type noMethod BackupRun raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BackupRunsListResponse: Backup run list results. @@ -322,12 +348,20 @@ type BackupRunsListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BackupRunsListResponse) MarshalJSON() ([]byte, error) { type noMethod BackupRunsListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BinLogCoordinates: Binary log coordinates. @@ -348,12 +382,21 @@ type BinLogCoordinates struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinLogFileName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *BinLogCoordinates) MarshalJSON() ([]byte, error) { type noMethod BinLogCoordinates raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // CloneContext: Database instance clone context. @@ -378,12 +421,21 @@ type CloneContext struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinLogCoordinates") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *CloneContext) MarshalJSON() ([]byte, error) { type noMethod CloneContext raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Database: A database resource inside a Cloud SQL instance. @@ -426,12 +478,20 @@ type Database struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Charset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Database) MarshalJSON() ([]byte, error) { type noMethod Database raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // DatabaseFlags: MySQL flags for Cloud SQL instances. @@ -456,12 +516,20 @@ type DatabaseFlags struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *DatabaseFlags) MarshalJSON() ([]byte, error) { type noMethod DatabaseFlags raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // DatabaseInstance: A Cloud SQL instance resource. @@ -473,6 +541,10 @@ type DatabaseInstance struct { // EXTERNAL: A MySQL server that is not managed by Google. BackendType string `json:"backendType,omitempty"` + // ConnectionName: Connection name of the Cloud SQL instance used in + // connection strings. + ConnectionName string `json:"connectionName,omitempty"` + // CurrentDiskSize: The current disk usage of the instance in bytes. // This property has been deprecated. Users should use the // "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud @@ -588,12 +660,20 @@ type DatabaseInstance struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackendType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *DatabaseInstance) MarshalJSON() ([]byte, error) { type noMethod DatabaseInstance raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // DatabaseInstanceFailoverReplica: The name and status of the failover @@ -618,12 +698,20 @@ type DatabaseInstanceFailoverReplica struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Available") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error) { type noMethod DatabaseInstanceFailoverReplica raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // DatabasesListResponse: Database list response. @@ -645,12 +733,20 @@ type DatabasesListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *DatabasesListResponse) MarshalJSON() ([]byte, error) { type noMethod DatabasesListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ExportContext: Database instance export context. @@ -690,12 +786,21 @@ type ExportContext struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CsvExportOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ExportContext) MarshalJSON() ([]byte, error) { type noMethod ExportContext raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ExportContextCsvExportOptions: Options for exporting data as CSV. @@ -710,12 +815,20 @@ type ExportContextCsvExportOptions struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SelectQuery") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error) { type noMethod ExportContextCsvExportOptions raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ExportContextSqlExportOptions: Options for exporting data as SQL @@ -735,12 +848,20 @@ type ExportContextSqlExportOptions struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SchemaOnly") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error) { type noMethod ExportContextSqlExportOptions raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // FailoverContext: Database instance failover context. @@ -760,12 +881,20 @@ type FailoverContext struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *FailoverContext) MarshalJSON() ([]byte, error) { type noMethod FailoverContext raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Flag: A Google Cloud SQL service flag resource. @@ -808,12 +937,21 @@ type Flag struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedStringValues") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *Flag) MarshalJSON() ([]byte, error) { type noMethod Flag raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // FlagsListResponse: Flags list response. @@ -835,12 +973,20 @@ type FlagsListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *FlagsListResponse) MarshalJSON() ([]byte, error) { type noMethod FlagsListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ImportContext: Database instance import context. @@ -874,12 +1020,21 @@ type ImportContext struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CsvImportOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ImportContext) MarshalJSON() ([]byte, error) { type noMethod ImportContext raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ImportContextCsvImportOptions: Options for importing data as CSV. @@ -898,12 +1053,20 @@ type ImportContextCsvImportOptions struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Columns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) { type noMethod ImportContextCsvImportOptions raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // InstancesCloneRequest: Database instance clone request. @@ -918,12 +1081,20 @@ type InstancesCloneRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CloneContext") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error) { type noMethod InstancesCloneRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // InstancesExportRequest: Database instance export request. @@ -938,12 +1109,20 @@ type InstancesExportRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExportContext") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *InstancesExportRequest) MarshalJSON() ([]byte, error) { type noMethod InstancesExportRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // InstancesFailoverRequest: Instance failover request. @@ -958,12 +1137,21 @@ type InstancesFailoverRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FailoverContext") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error) { type noMethod InstancesFailoverRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // InstancesImportRequest: Database instance import request. @@ -978,12 +1166,20 @@ type InstancesImportRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ImportContext") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *InstancesImportRequest) MarshalJSON() ([]byte, error) { type noMethod InstancesImportRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // InstancesListResponse: Database instances list response. @@ -1010,12 +1206,20 @@ type InstancesListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *InstancesListResponse) MarshalJSON() ([]byte, error) { type noMethod InstancesListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // InstancesRestoreBackupRequest: Database instance restore backup @@ -1033,12 +1237,21 @@ type InstancesRestoreBackupRequest struct { // field is empty or not. This may be used to include empty fields in // Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RestoreBackupContext") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) { type noMethod InstancesRestoreBackupRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // IpConfiguration: IP Management configuration. @@ -1063,12 +1276,21 @@ type IpConfiguration struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthorizedNetworks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *IpConfiguration) MarshalJSON() ([]byte, error) { type noMethod IpConfiguration raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // IpMapping: Database instance IP Mapping. @@ -1081,6 +1303,12 @@ type IpMapping struct { // available when the IP is scheduled to be retired. TimeToRetire string `json:"timeToRetire,omitempty"` + // Type: The type of this IP address. A PRIMARY address is an address + // that can accept incoming connections. An OUTGOING address is the + // source address of connections originating from the instance, if + // supported. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "IpAddress") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -1088,12 +1316,20 @@ type IpMapping struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IpAddress") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *IpMapping) MarshalJSON() ([]byte, error) { type noMethod IpMapping raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // LocationPreference: Preferred location. This specifies where a Cloud @@ -1122,12 +1358,21 @@ type LocationPreference struct { // field is empty or not. This may be used to include empty fields in // Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FollowGaeApplication") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *LocationPreference) MarshalJSON() ([]byte, error) { type noMethod LocationPreference raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // MaintenanceWindow: Maintenance window. This specifies when a v2 Cloud @@ -1152,12 +1397,20 @@ type MaintenanceWindow struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { type noMethod MaintenanceWindow raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // MySqlReplicaConfiguration: Read-replica configuration specific to @@ -1214,12 +1467,20 @@ type MySqlReplicaConfiguration struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaCertificate") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error) { type noMethod MySqlReplicaConfiguration raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // OnPremisesConfiguration: On-premises instance configuration. @@ -1238,12 +1499,20 @@ type OnPremisesConfiguration struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HostPort") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error) { type noMethod OnPremisesConfiguration raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Operation: An Operations resource contains information about database @@ -1318,12 +1587,20 @@ type Operation struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Operation) MarshalJSON() ([]byte, error) { type noMethod Operation raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // OperationError: Database instance operation error. @@ -1344,12 +1621,20 @@ type OperationError struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *OperationError) MarshalJSON() ([]byte, error) { type noMethod OperationError raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // OperationErrors: Database instance operation errors list wrapper. @@ -1368,12 +1653,20 @@ type OperationErrors struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *OperationErrors) MarshalJSON() ([]byte, error) { type noMethod OperationErrors raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // OperationsListResponse: Database instance list operations response. @@ -1400,12 +1693,20 @@ type OperationsListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *OperationsListResponse) MarshalJSON() ([]byte, error) { type noMethod OperationsListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ReplicaConfiguration: Read-replica configuration for connecting to @@ -1438,12 +1739,21 @@ type ReplicaConfiguration struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FailoverTarget") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error) { type noMethod ReplicaConfiguration raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // RestoreBackupContext: Database instance restore from backup context. @@ -1464,12 +1774,20 @@ type RestoreBackupContext struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackupRunId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *RestoreBackupContext) MarshalJSON() ([]byte, error) { type noMethod RestoreBackupContext raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Settings: Database instance settings. @@ -1570,12 +1888,21 @@ type Settings struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActivationPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *Settings) MarshalJSON() ([]byte, error) { type noMethod Settings raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SslCert: SslCerts Resource @@ -1620,12 +1947,20 @@ type SslCert struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cert") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SslCert) MarshalJSON() ([]byte, error) { type noMethod SslCert raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SslCertDetail: SslCertDetail. @@ -1644,12 +1979,20 @@ type SslCertDetail struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CertInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SslCertDetail) MarshalJSON() ([]byte, error) { type noMethod SslCertDetail raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SslCertsCreateEphemeralRequest: SslCerts create ephemeral certificate @@ -1666,12 +2009,20 @@ type SslCertsCreateEphemeralRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicKey") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error) { type noMethod SslCertsCreateEphemeralRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SslCertsInsertRequest: SslCerts insert request. @@ -1688,12 +2039,20 @@ type SslCertsInsertRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommonName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error) { type noMethod SslCertsInsertRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SslCertsInsertResponse: SslCert insert response. @@ -1725,12 +2084,20 @@ type SslCertsInsertResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientCert") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error) { type noMethod SslCertsInsertResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // SslCertsListResponse: SslCerts list response. @@ -1752,12 +2119,20 @@ type SslCertsListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *SslCertsListResponse) MarshalJSON() ([]byte, error) { type noMethod SslCertsListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Tier: A Google Cloud SQL service tier resource. @@ -1771,8 +2146,7 @@ type Tier struct { // Kind: This is always sql#tier. Kind string `json:"kind,omitempty"` - // Region: The applicable regions for this tier. Can be us-east1, - // europe-west1 or asia-east1. + // Region: The applicable regions for this tier. Region []string `json:"region,omitempty"` // Tier: An identifier for the service tier, for example D1, D2 etc. For @@ -1786,12 +2160,20 @@ type Tier struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskQuota") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Tier) MarshalJSON() ([]byte, error) { type noMethod Tier raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // TiersListResponse: Tiers list response. @@ -1813,12 +2195,20 @@ type TiersListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *TiersListResponse) MarshalJSON() ([]byte, error) { type noMethod TiersListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // User: A Cloud SQL user resource. @@ -1859,12 +2249,20 @@ type User struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *User) MarshalJSON() ([]byte, error) { type noMethod User raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // UsersListResponse: User list response. @@ -1891,12 +2289,20 @@ type UsersListResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *UsersListResponse) MarshalJSON() ([]byte, error) { type noMethod UsersListResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // method id "sql.backupRuns.delete": @@ -1908,6 +2314,7 @@ type BackupRunsDeleteCall struct { id int64 urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes the backup taken by a backup run. @@ -1935,8 +2342,20 @@ func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCal return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackupRunsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -2041,6 +2460,7 @@ type BackupRunsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves a resource containing information about a backup run. @@ -2078,8 +2498,20 @@ func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackupRunsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2186,9 +2618,11 @@ type BackupRunsInsertCall struct { backuprun *BackupRun urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Insert: Creates a new backup run on demand. +// Insert: Creates a new backup run on demand. This method is applicable +// only to Second Generation instances. func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall { c := &BackupRunsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -2213,8 +2647,20 @@ func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCal return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackupRunsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuprun) @@ -2272,7 +2718,7 @@ func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Creates a new backup run on demand.", + // "description": "Creates a new backup run on demand. This method is applicable only to Second Generation instances.", // "httpMethod": "POST", // "id": "sql.backupRuns.insert", // "parameterOrder": [ @@ -2299,7 +2745,11 @@ func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err // }, // "response": { // "$ref": "Operation" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sqlservice.admin" + // ] // } } @@ -2313,6 +2763,7 @@ type BackupRunsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists all backup runs associated with a given instance and @@ -2366,8 +2817,20 @@ func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackupRunsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2497,6 +2960,7 @@ type DatabasesDeleteCall struct { database string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes a database from a Cloud SQL instance. @@ -2524,8 +2988,20 @@ func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DatabasesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -2629,6 +3105,7 @@ type DatabasesGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves a resource containing information about a database @@ -2667,8 +3144,20 @@ func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DatabasesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DatabasesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2774,6 +3263,7 @@ type DatabasesInsertCall struct { database *Database urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Inserts a resource containing information about a database @@ -2802,8 +3292,20 @@ func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DatabasesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.database) @@ -2906,6 +3408,7 @@ type DatabasesListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists databases in the specified Cloud SQL instance. @@ -2942,8 +3445,20 @@ func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DatabasesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DatabasesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -3042,6 +3557,7 @@ type DatabasesPatchCall struct { database2 *Database urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Patch: Updates a resource containing information about a database @@ -3071,8 +3587,20 @@ func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DatabasesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2) @@ -3184,6 +3712,7 @@ type DatabasesUpdateCall struct { database2 *Database urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates a resource containing information about a database @@ -3213,8 +3742,20 @@ func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DatabasesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2) @@ -3323,6 +3864,7 @@ type FlagsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: List all available database flags for Google Cloud SQL @@ -3358,8 +3900,20 @@ func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FlagsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -3370,7 +3924,6 @@ func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) { urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders - googleapi.SetOpaque(req.URL) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3436,6 +3989,7 @@ type InstancesCloneCall struct { instancesclonerequest *InstancesCloneRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Clone: Creates a Cloud SQL instance as a clone of the source @@ -3464,8 +4018,20 @@ func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesCloneCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesclonerequest) @@ -3567,6 +4133,7 @@ type InstancesDeleteCall struct { instance string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes a Cloud SQL instance. @@ -3593,8 +4160,20 @@ func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -3689,6 +4268,7 @@ type InstancesExportCall struct { instancesexportrequest *InstancesExportRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Export: Exports data from a Cloud SQL instance to a Google Cloud @@ -3717,8 +4297,20 @@ func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesexportrequest) @@ -3820,6 +4412,7 @@ type InstancesFailoverCall struct { instancesfailoverrequest *InstancesFailoverRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Failover: Failover the instance to its failover replica instance. @@ -3847,8 +4440,20 @@ func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverC return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesFailoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesFailoverCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesfailoverrequest) @@ -3951,6 +4556,7 @@ type InstancesGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves a resource containing information about a Cloud SQL @@ -3988,8 +4594,20 @@ func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4087,6 +4705,7 @@ type InstancesImportCall struct { instancesimportrequest *InstancesImportRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Import: Imports data into a Cloud SQL instance from a MySQL dump file @@ -4115,8 +4734,20 @@ func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesimportrequest) @@ -4217,6 +4848,7 @@ type InstancesInsertCall struct { databaseinstance *DatabaseInstance urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Creates a new Cloud SQL instance. @@ -4243,8 +4875,20 @@ func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance) @@ -4338,6 +4982,7 @@ type InstancesListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists instances under a given project in the alphabetical order @@ -4389,8 +5034,20 @@ func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4512,6 +5169,7 @@ type InstancesPatchCall struct { databaseinstance *DatabaseInstance urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Patch: Updates settings of a Cloud SQL instance. Caution: This is not @@ -4542,8 +5200,20 @@ func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance) @@ -4645,6 +5315,7 @@ type InstancesPromoteReplicaCall struct { instance string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // PromoteReplica: Promotes the read replica instance to be a @@ -4672,8 +5343,20 @@ func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPro return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesPromoteReplicaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -4767,6 +5450,7 @@ type InstancesResetSslConfigCall struct { instance string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // ResetSslConfig: Deletes all client certificates and generates a new @@ -4797,8 +5481,20 @@ func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesRes return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesResetSslConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -4892,6 +5588,7 @@ type InstancesRestartCall struct { instance string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Restart: Restarts a Cloud SQL instance. @@ -4918,8 +5615,20 @@ func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCal return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesRestartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -5014,6 +5723,7 @@ type InstancesRestoreBackupCall struct { instancesrestorebackuprequest *InstancesRestoreBackupRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // RestoreBackup: Restores a backup of a Cloud SQL instance. @@ -5041,8 +5751,20 @@ func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRest return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesRestoreBackupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrestorebackuprequest) @@ -5144,6 +5866,7 @@ type InstancesStartReplicaCall struct { instance string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // StartReplica: Starts the replication in the read replica instance. @@ -5170,8 +5893,20 @@ func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStart return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesStartReplicaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -5265,6 +6000,7 @@ type InstancesStopReplicaCall struct { instance string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // StopReplica: Stops the replication in the read replica instance. @@ -5291,8 +6027,20 @@ func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopRe return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesStopReplicaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -5387,6 +6135,7 @@ type InstancesUpdateCall struct { databaseinstance *DatabaseInstance urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates settings of a Cloud SQL instance. Caution: This is @@ -5416,8 +6165,20 @@ func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance) @@ -5521,6 +6282,7 @@ type OperationsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves an instance operation that has been performed on an @@ -5558,8 +6320,20 @@ func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -5656,6 +6430,7 @@ type OperationsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists all instance operations that have been performed on the @@ -5709,8 +6484,20 @@ func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -5839,6 +6626,7 @@ type SslCertsCreateEphemeralCall struct { sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // CreateEphemeral: Generates a short-lived X509 certificate containing @@ -5869,8 +6657,20 @@ func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCrea return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SslCertsCreateEphemeralCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertscreateephemeralrequest) @@ -5973,6 +6773,7 @@ type SslCertsDeleteCall struct { sha1Fingerprint string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes the SSL certificate. The change will not take effect @@ -6001,8 +6802,20 @@ func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SslCertsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -6106,6 +6919,7 @@ type SslCertsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves a particular SSL certificate. Does not include the @@ -6145,8 +6959,20 @@ func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SslCertsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -6252,6 +7078,7 @@ type SslCertsInsertCall struct { sslcertsinsertrequest *SslCertsInsertRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Creates an SSL certificate and returns it along with the @@ -6281,8 +7108,20 @@ func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SslCertsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertsinsertrequest) @@ -6385,6 +7224,7 @@ type SslCertsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists all of the current SSL certificates for the instance. @@ -6421,8 +7261,20 @@ func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SslCertsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -6519,6 +7371,7 @@ type TiersListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists all available service tiers for Google Cloud SQL, for @@ -6555,8 +7408,20 @@ func (c *TiersListCall) Context(ctx context.Context) *TiersListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TiersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *TiersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -6645,6 +7510,7 @@ type UsersDeleteCall struct { instance string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes a user from a Cloud SQL instance. @@ -6673,8 +7539,20 @@ func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -6783,6 +7661,7 @@ type UsersInsertCall struct { user *User urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Creates a new user in a Cloud SQL instance. @@ -6810,8 +7689,20 @@ func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.user) @@ -6914,6 +7805,7 @@ type UsersListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Lists users in the specified Cloud SQL instance. @@ -6950,8 +7842,20 @@ func (c *UsersListCall) Context(ctx context.Context) *UsersListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *UsersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -7049,6 +7953,7 @@ type UsersUpdateCall struct { user *User urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates an existing user in a Cloud SQL instance. @@ -7078,8 +7983,20 @@ func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *UsersUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.user) diff --git a/vendor/google.golang.org/api/storage/v1/storage-api.json b/vendor/google.golang.org/api/storage/v1/storage-api.json index 69a87c832..67fe1a210 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-api.json +++ b/vendor/google.golang.org/api/storage/v1/storage-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/WoNfwvHOxLFHVTodCpDiAsVbMpQ\"", + "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/sMgjc4eoIFjgub4daTU-MGW0WMA\"", "discoveryVersion": "v1", "id": "storage:v1", "name": "storage", "version": "v1", - "revision": "20160714", + "revision": "20161109", "title": "Cloud Storage JSON API", "description": "Stores and retrieves potentially large, immutable data objects.", "ownerDomain": "google.com", @@ -177,9 +177,13 @@ "type": "object", "description": "The action to take.", "properties": { + "storageClass": { + "type": "string", + "description": "Target storage class. Required iff the type of the action is SetStorageClass." + }, "type": { "type": "string", - "description": "Type of the action. Currently, only Delete is supported." + "description": "Type of the action. Currently, only Delete and SetStorageClass are supported." } } }, @@ -201,6 +205,13 @@ "type": "boolean", "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects." }, + "matchesStorageClass": { + "type": "array", + "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.", + "items": { + "type": "string" + } + }, "numNewerVersions": { "type": "integer", "description": "Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.", @@ -270,7 +281,7 @@ }, "storageClass": { "type": "string", - "description": "The bucket's storage class. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include STANDARD, NEARLINE and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. For more information, see storage classes." + "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes." }, "timeCreated": { "type": "string", @@ -674,6 +685,11 @@ "description": "The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.", "format": "date-time" }, + "timeStorageClassUpdated": { + "type": "string", + "description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.", + "format": "date-time" + }, "updated": { "type": "string", "description": "The modification time of the object metadata in RFC 3339 format.", @@ -700,7 +716,13 @@ }, "entity": { "type": "string", - "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com." + "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", + "annotations": { + "required": [ + "storage.defaultObjectAccessControls.insert", + "storage.objectAccessControls.insert" + ] + } }, "entityId": { "type": "string", @@ -712,7 +734,7 @@ }, "generation": { "type": "string", - "description": "The content generation of the object.", + "description": "The content generation of the object, if applied to an object.", "format": "int64" }, "id": { @@ -726,7 +748,7 @@ }, "object": { "type": "string", - "description": "The name of the object." + "description": "The name of the object, if applied to an object." }, "projectTeam": { "type": "object", @@ -744,7 +766,13 @@ }, "role": { "type": "string", - "description": "The access permission for the entity." + "description": "The access permission for the entity.", + "annotations": { + "required": [ + "storage.defaultObjectAccessControls.insert", + "storage.objectAccessControls.insert" + ] + } }, "selfLink": { "type": "string", @@ -761,7 +789,7 @@ "type": "array", "description": "The list of items.", "items": { - "type": "any" + "$ref": "ObjectAccessControl" } }, "kind": { @@ -1249,7 +1277,7 @@ "id": "storage.buckets.patch", "path": "b/{bucket}", "httpMethod": "PATCH", - "description": "Updates a bucket. This method supports patch semantics.", + "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.", "parameters": { "bucket": { "type": "string", @@ -1341,7 +1369,7 @@ "id": "storage.buckets.update", "path": "b/{bucket}", "httpMethod": "PUT", - "description": "Updates a bucket.", + "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", "parameters": { "bucket": { "type": "string", diff --git a/vendor/google.golang.org/api/storage/v1/storage-gen.go b/vendor/google.golang.org/api/storage/v1/storage-gen.go index f45054a19..0f1d094a7 100644 --- a/vendor/google.golang.org/api/storage/v1/storage-gen.go +++ b/vendor/google.golang.org/api/storage/v1/storage-gen.go @@ -210,10 +210,13 @@ type Bucket struct { // SelfLink: The URI of this bucket. SelfLink string `json:"selfLink,omitempty"` - // StorageClass: The bucket's storage class. This defines how objects in - // the bucket are stored and determines the SLA and the cost of storage. - // Values include STANDARD, NEARLINE and DURABLE_REDUCED_AVAILABILITY. - // Defaults to STANDARD. For more information, see storage classes. + // StorageClass: The bucket's default storage class, used whenever no + // storageClass is specified for a newly-created object. This defines + // how objects in the bucket are stored and determines the SLA and the + // cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, + // NEARLINE, COLDLINE, and DURABLE_REDUCED_AVAILABILITY. If this value + // is not specified when the bucket is created, it will default to + // STANDARD. For more information, see storage classes. StorageClass string `json:"storageClass,omitempty"` // TimeCreated: The creation time of the bucket in RFC 3339 format. @@ -241,12 +244,20 @@ type Bucket struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Acl") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Bucket) MarshalJSON() ([]byte, error) { type noMethod Bucket raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } type BucketCors struct { @@ -276,12 +287,20 @@ type BucketCors struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxAgeSeconds") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketCors) MarshalJSON() ([]byte, error) { type noMethod BucketCors raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketLifecycle: The bucket's lifecycle configuration. See lifecycle @@ -298,12 +317,20 @@ type BucketLifecycle struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Rule") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketLifecycle) MarshalJSON() ([]byte, error) { type noMethod BucketLifecycle raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } type BucketLifecycleRule struct { @@ -320,32 +347,53 @@ type BucketLifecycleRule struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketLifecycleRule) MarshalJSON() ([]byte, error) { type noMethod BucketLifecycleRule raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketLifecycleRuleAction: The action to take. type BucketLifecycleRuleAction struct { - // Type: Type of the action. Currently, only Delete is supported. + // StorageClass: Target storage class. Required iff the type of the + // action is SetStorageClass. + StorageClass string `json:"storageClass,omitempty"` + + // Type: Type of the action. Currently, only Delete and SetStorageClass + // are supported. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to + // ForceSendFields is a list of field names (e.g. "StorageClass") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StorageClass") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketLifecycleRuleAction) MarshalJSON() ([]byte, error) { type noMethod BucketLifecycleRuleAction raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketLifecycleRuleCondition: The condition(s) under which the action @@ -365,6 +413,12 @@ type BucketLifecycleRuleCondition struct { // matches archived objects. IsLive bool `json:"isLive,omitempty"` + // MatchesStorageClass: Objects having any of the storage classes + // specified by this condition will be matched. Values include + // MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD, and + // DURABLE_REDUCED_AVAILABILITY. + MatchesStorageClass []string `json:"matchesStorageClass,omitempty"` + // NumNewerVersions: Relevant only for versioned objects. If the value // is N, this condition is satisfied when there are at least N versions // (including the live version) newer than this version of the object. @@ -377,12 +431,20 @@ type BucketLifecycleRuleCondition struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Age") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketLifecycleRuleCondition) MarshalJSON() ([]byte, error) { type noMethod BucketLifecycleRuleCondition raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketLogging: The bucket's logging configuration, which defines the @@ -403,12 +465,20 @@ type BucketLogging struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogBucket") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketLogging) MarshalJSON() ([]byte, error) { type noMethod BucketLogging raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketOwner: The owner of the bucket. This is always the project @@ -427,12 +497,20 @@ type BucketOwner struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Entity") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketOwner) MarshalJSON() ([]byte, error) { type noMethod BucketOwner raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketVersioning: The bucket's versioning configuration. @@ -448,12 +526,20 @@ type BucketVersioning struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketVersioning) MarshalJSON() ([]byte, error) { type noMethod BucketVersioning raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketWebsite: The bucket's website configuration, controlling how @@ -479,12 +565,21 @@ type BucketWebsite struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MainPageSuffix") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *BucketWebsite) MarshalJSON() ([]byte, error) { type noMethod BucketWebsite raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketAccessControl: An access-control entry. @@ -548,12 +643,20 @@ type BucketAccessControl struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketAccessControl) MarshalJSON() ([]byte, error) { type noMethod BucketAccessControl raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketAccessControlProjectTeam: The project team associated with the @@ -572,12 +675,20 @@ type BucketAccessControlProjectTeam struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProjectNumber") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketAccessControlProjectTeam) MarshalJSON() ([]byte, error) { type noMethod BucketAccessControlProjectTeam raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // BucketAccessControls: An access-control list. @@ -600,12 +711,20 @@ type BucketAccessControls struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *BucketAccessControls) MarshalJSON() ([]byte, error) { type noMethod BucketAccessControls raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Buckets: A list of buckets. @@ -633,12 +752,20 @@ type Buckets struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Buckets) MarshalJSON() ([]byte, error) { type noMethod Buckets raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Channel: An notification channel used to watch for resource changes. @@ -691,12 +818,20 @@ type Channel struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Address") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Channel) MarshalJSON() ([]byte, error) { type noMethod Channel raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ComposeRequest: A Compose request. @@ -718,12 +853,20 @@ type ComposeRequest struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destination") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ComposeRequest) MarshalJSON() ([]byte, error) { type noMethod ComposeRequest raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } type ComposeRequestSourceObjects struct { @@ -745,12 +888,20 @@ type ComposeRequestSourceObjects struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Generation") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ComposeRequestSourceObjects) MarshalJSON() ([]byte, error) { type noMethod ComposeRequestSourceObjects raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ComposeRequestSourceObjectsObjectPreconditions: Conditions that must @@ -769,12 +920,21 @@ type ComposeRequestSourceObjectsObjectPreconditions struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IfGenerationMatch") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ComposeRequestSourceObjectsObjectPreconditions) MarshalJSON() ([]byte, error) { type noMethod ComposeRequestSourceObjectsObjectPreconditions raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Object: An object. @@ -874,6 +1034,11 @@ type Object struct { // deleted. TimeDeleted string `json:"timeDeleted,omitempty"` + // TimeStorageClassUpdated: The time at which the object's storage class + // was last changed. When the object is initially created, it will be + // set to timeCreated. + TimeStorageClassUpdated string `json:"timeStorageClassUpdated,omitempty"` + // Updated: The modification time of the object metadata in RFC 3339 // format. Updated string `json:"updated,omitempty"` @@ -889,12 +1054,20 @@ type Object struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Acl") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Object) MarshalJSON() ([]byte, error) { type noMethod Object raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ObjectCustomerEncryption: Metadata of customer-supplied encryption @@ -913,12 +1086,21 @@ type ObjectCustomerEncryption struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EncryptionAlgorithm") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *ObjectCustomerEncryption) MarshalJSON() ([]byte, error) { type noMethod ObjectCustomerEncryption raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ObjectOwner: The owner of the object. This will always be the @@ -937,12 +1119,20 @@ type ObjectOwner struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Entity") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ObjectOwner) MarshalJSON() ([]byte, error) { type noMethod ObjectOwner raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ObjectAccessControl: An access-control entry. @@ -979,7 +1169,8 @@ type ObjectAccessControl struct { // Etag: HTTP 1.1 Entity tag for the access-control entry. Etag string `json:"etag,omitempty"` - // Generation: The content generation of the object. + // Generation: The content generation of the object, if applied to an + // object. Generation int64 `json:"generation,omitempty,string"` // Id: The ID of the access-control entry. @@ -989,7 +1180,7 @@ type ObjectAccessControl struct { // this is always storage#objectAccessControl. Kind string `json:"kind,omitempty"` - // Object: The name of the object. + // Object: The name of the object, if applied to an object. Object string `json:"object,omitempty"` // ProjectTeam: The project team associated with the entity, if any. @@ -1012,12 +1203,20 @@ type ObjectAccessControl struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ObjectAccessControl) MarshalJSON() ([]byte, error) { type noMethod ObjectAccessControl raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ObjectAccessControlProjectTeam: The project team associated with the @@ -1036,18 +1235,26 @@ type ObjectAccessControlProjectTeam struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProjectNumber") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ObjectAccessControlProjectTeam) MarshalJSON() ([]byte, error) { type noMethod ObjectAccessControlProjectTeam raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // ObjectAccessControls: An access-control list. type ObjectAccessControls struct { // Items: The list of items. - Items []interface{} `json:"items,omitempty"` + Items []*ObjectAccessControl `json:"items,omitempty"` // Kind: The kind of item this is. For lists of object access control // entries, this is always storage#objectAccessControls. @@ -1064,12 +1271,20 @@ type ObjectAccessControls struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *ObjectAccessControls) MarshalJSON() ([]byte, error) { type noMethod ObjectAccessControls raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // Objects: A list of objects. @@ -1101,12 +1316,20 @@ type Objects struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *Objects) MarshalJSON() ([]byte, error) { type noMethod Objects raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // RewriteResponse: A rewrite response. @@ -1148,12 +1371,20 @@ type RewriteResponse struct { // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } func (s *RewriteResponse) MarshalJSON() ([]byte, error) { type noMethod RewriteResponse raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // method id "storage.bucketAccessControls.delete": @@ -1164,6 +1395,7 @@ type BucketAccessControlsDeleteCall struct { entity string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Permanently deletes the ACL entry for the specified entity on @@ -1191,8 +1423,20 @@ func (c *BucketAccessControlsDeleteCall) Context(ctx context.Context) *BucketAcc return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketAccessControlsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -1259,6 +1503,7 @@ type BucketAccessControlsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Returns the ACL entry for the specified entity on the specified @@ -1296,8 +1541,20 @@ func (c *BucketAccessControlsGetCall) Context(ctx context.Context) *BucketAccess return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketAccessControlsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1394,6 +1651,7 @@ type BucketAccessControlsInsertCall struct { bucketaccesscontrol *BucketAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Creates a new ACL entry on the specified bucket. @@ -1420,8 +1678,20 @@ func (c *BucketAccessControlsInsertCall) Context(ctx context.Context) *BucketAcc return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketAccessControlsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol) @@ -1515,6 +1785,7 @@ type BucketAccessControlsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Retrieves ACL entries on the specified bucket. @@ -1550,8 +1821,20 @@ func (c *BucketAccessControlsListCall) Context(ctx context.Context) *BucketAcces return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketAccessControlsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1641,6 +1924,7 @@ type BucketAccessControlsPatchCall struct { bucketaccesscontrol *BucketAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Patch: Updates an ACL entry on the specified bucket. This method @@ -1669,8 +1953,20 @@ func (c *BucketAccessControlsPatchCall) Context(ctx context.Context) *BucketAcce return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketAccessControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol) @@ -1773,6 +2069,7 @@ type BucketAccessControlsUpdateCall struct { bucketaccesscontrol *BucketAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates an ACL entry on the specified bucket. @@ -1800,8 +2097,20 @@ func (c *BucketAccessControlsUpdateCall) Context(ctx context.Context) *BucketAcc return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketAccessControlsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol) @@ -1902,6 +2211,7 @@ type BucketsDeleteCall struct { bucket string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Permanently deletes an empty bucket. @@ -1943,8 +2253,20 @@ func (c *BucketsDeleteCall) Context(ctx context.Context) *BucketsDeleteCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -2015,6 +2337,7 @@ type BucketsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Returns metadata for the specified bucket. @@ -2079,8 +2402,20 @@ func (c *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2196,6 +2531,7 @@ type BucketsInsertCall struct { bucket *Bucket urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Creates a new bucket. @@ -2274,8 +2610,20 @@ func (c *BucketsInsertCall) Context(ctx context.Context) *BucketsInsertCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket) @@ -2288,7 +2636,6 @@ func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) { urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders - googleapi.SetOpaque(req.URL) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2420,6 +2767,7 @@ type BucketsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Retrieves a list of buckets for a given project. @@ -2488,8 +2836,20 @@ func (c *BucketsListCall) Context(ctx context.Context) *BucketsListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2500,7 +2860,6 @@ func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) { urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("GET", urls, body) req.Header = reqHeaders - googleapi.SetOpaque(req.URL) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2630,9 +2989,12 @@ type BucketsPatchCall struct { bucket2 *Bucket urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Patch: Updates a bucket. This method supports patch semantics. +// Patch: Updates a bucket. Changes to the bucket will be readable +// immediately after writing, but configuration changes may take time to +// propagate. This method supports patch semantics. func (r *BucketsService) Patch(bucket string, bucket2 *Bucket) *BucketsPatchCall { c := &BucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -2724,8 +3086,20 @@ func (c *BucketsPatchCall) Context(ctx context.Context) *BucketsPatchCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2) @@ -2782,7 +3156,7 @@ func (c *BucketsPatchCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { } return ret, nil // { - // "description": "Updates a bucket. This method supports patch semantics.", + // "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.", // "httpMethod": "PATCH", // "id": "storage.buckets.patch", // "parameterOrder": [ @@ -2884,9 +3258,12 @@ type BucketsUpdateCall struct { bucket2 *Bucket urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } -// Update: Updates a bucket. +// Update: Updates a bucket. Changes to the bucket will be readable +// immediately after writing, but configuration changes may take time to +// propagate. func (r *BucketsService) Update(bucket string, bucket2 *Bucket) *BucketsUpdateCall { c := &BucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.bucket = bucket @@ -2978,8 +3355,20 @@ func (c *BucketsUpdateCall) Context(ctx context.Context) *BucketsUpdateCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BucketsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2) @@ -3036,7 +3425,7 @@ func (c *BucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { } return ret, nil // { - // "description": "Updates a bucket.", + // "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", // "httpMethod": "PUT", // "id": "storage.buckets.update", // "parameterOrder": [ @@ -3137,6 +3526,7 @@ type ChannelsStopCall struct { channel *Channel urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Stop: Stop watching resources through this channel @@ -3162,8 +3552,20 @@ func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ChannelsStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) @@ -3176,7 +3578,6 @@ func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) { urls += "?" + c.urlParams_.Encode() req, _ := http.NewRequest("POST", urls, body) req.Header = reqHeaders - googleapi.SetOpaque(req.URL) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -3220,6 +3621,7 @@ type DefaultObjectAccessControlsDeleteCall struct { entity string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Permanently deletes the default object ACL entry for the @@ -3247,8 +3649,20 @@ func (c *DefaultObjectAccessControlsDeleteCall) Context(ctx context.Context) *De return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DefaultObjectAccessControlsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -3315,6 +3729,7 @@ type DefaultObjectAccessControlsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Returns the default object ACL entry for the specified entity on @@ -3352,8 +3767,20 @@ func (c *DefaultObjectAccessControlsGetCall) Context(ctx context.Context) *Defau return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DefaultObjectAccessControlsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -3450,6 +3877,7 @@ type DefaultObjectAccessControlsInsertCall struct { objectaccesscontrol *ObjectAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Creates a new default object ACL entry on the specified @@ -3477,8 +3905,20 @@ func (c *DefaultObjectAccessControlsInsertCall) Context(ctx context.Context) *De return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DefaultObjectAccessControlsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) @@ -3572,6 +4012,7 @@ type DefaultObjectAccessControlsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Retrieves default object ACL entries on the specified bucket. @@ -3624,8 +4065,20 @@ func (c *DefaultObjectAccessControlsListCall) Context(ctx context.Context) *Defa return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DefaultObjectAccessControlsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -3727,6 +4180,7 @@ type DefaultObjectAccessControlsPatchCall struct { objectaccesscontrol *ObjectAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Patch: Updates a default object ACL entry on the specified bucket. @@ -3755,8 +4209,20 @@ func (c *DefaultObjectAccessControlsPatchCall) Context(ctx context.Context) *Def return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DefaultObjectAccessControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) @@ -3859,6 +4325,7 @@ type DefaultObjectAccessControlsUpdateCall struct { objectaccesscontrol *ObjectAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates a default object ACL entry on the specified bucket. @@ -3886,8 +4353,20 @@ func (c *DefaultObjectAccessControlsUpdateCall) Context(ctx context.Context) *De return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *DefaultObjectAccessControlsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) @@ -3990,6 +4469,7 @@ type ObjectAccessControlsDeleteCall struct { entity string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Permanently deletes the ACL entry for the specified entity on @@ -4026,8 +4506,20 @@ func (c *ObjectAccessControlsDeleteCall) Context(ctx context.Context) *ObjectAcc return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectAccessControlsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -4109,6 +4601,7 @@ type ObjectAccessControlsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Returns the ACL entry for the specified entity on the specified @@ -4155,8 +4648,20 @@ func (c *ObjectAccessControlsGetCall) Context(ctx context.Context) *ObjectAccess return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectAccessControlsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4268,6 +4773,7 @@ type ObjectAccessControlsInsertCall struct { objectaccesscontrol *ObjectAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Insert: Creates a new ACL entry on the specified object. @@ -4303,8 +4809,20 @@ func (c *ObjectAccessControlsInsertCall) Context(ctx context.Context) *ObjectAcc return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectAccessControlsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) @@ -4413,6 +4931,7 @@ type ObjectAccessControlsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Retrieves ACL entries on the specified object. @@ -4457,8 +4976,20 @@ func (c *ObjectAccessControlsListCall) Context(ctx context.Context) *ObjectAcces return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectAccessControlsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4563,6 +5094,7 @@ type ObjectAccessControlsPatchCall struct { objectaccesscontrol *ObjectAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Patch: Updates an ACL entry on the specified object. This method @@ -4600,8 +5132,20 @@ func (c *ObjectAccessControlsPatchCall) Context(ctx context.Context) *ObjectAcce return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectAccessControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) @@ -4719,6 +5263,7 @@ type ObjectAccessControlsUpdateCall struct { objectaccesscontrol *ObjectAccessControl urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates an ACL entry on the specified object. @@ -4755,8 +5300,20 @@ func (c *ObjectAccessControlsUpdateCall) Context(ctx context.Context) *ObjectAcc return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectAccessControlsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol) @@ -4873,6 +5430,7 @@ type ObjectsComposeCall struct { composerequest *ComposeRequest urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Compose: Concatenates a list of existing objects into a new object in @@ -4938,8 +5496,20 @@ func (c *ObjectsComposeCall) Context(ctx context.Context) *ObjectsComposeCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsComposeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.composerequest) @@ -5096,6 +5666,7 @@ type ObjectsCopyCall struct { object *Object urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Copy: Copies a source object to a destination object. Optionally @@ -5237,8 +5808,20 @@ func (c *ObjectsCopyCall) Context(ctx context.Context) *ObjectsCopyCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsCopyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object) @@ -5463,6 +6046,7 @@ type ObjectsDeleteCall struct { object string urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Delete: Deletes an object and its metadata. Deletions are permanent @@ -5532,8 +6116,20 @@ func (c *ObjectsDeleteCall) Context(ctx context.Context) *ObjectsDeleteCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -5631,6 +6227,7 @@ type ObjectsGetCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // Get: Retrieves an object or its metadata. @@ -5719,8 +6316,20 @@ func (c *ObjectsGetCall) Context(ctx context.Context) *ObjectsGetCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -5886,6 +6495,7 @@ type ObjectsInsertCall struct { mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_. progressUpdater_ googleapi.ProgressUpdater ctx_ context.Context + header_ http.Header } // Insert: Stores a new object and metadata. @@ -6048,8 +6658,20 @@ func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object) @@ -6278,6 +6900,7 @@ type ObjectsListCall struct { urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context + header_ http.Header } // List: Retrieves a list of objects matching the criteria. @@ -6367,8 +6990,20 @@ func (c *ObjectsListCall) Context(ctx context.Context) *ObjectsListCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -6523,6 +7158,7 @@ type ObjectsPatchCall struct { object2 *Object urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Patch: Updates an object's metadata. This method supports patch @@ -6623,8 +7259,20 @@ func (c *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2) @@ -6793,6 +7441,7 @@ type ObjectsRewriteCall struct { object *Object urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Rewrite: Rewrites a source object to a destination object. Optionally @@ -6959,8 +7608,20 @@ func (c *ObjectsRewriteCall) Context(ctx context.Context) *ObjectsRewriteCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsRewriteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object) @@ -7179,6 +7840,7 @@ type ObjectsUpdateCall struct { object2 *Object urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // Update: Updates an object's metadata. @@ -7278,8 +7940,20 @@ func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall { return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2) @@ -7463,6 +8137,7 @@ type ObjectsWatchAllCall struct { channel *Channel urlParams_ gensupport.URLParams ctx_ context.Context + header_ http.Header } // WatchAll: Watch for changes on all objects in a bucket. @@ -7543,8 +8218,20 @@ func (c *ObjectsWatchAllCall) Context(ctx context.Context) *ObjectsWatchAllCall return c } +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ObjectsWatchAllCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) diff --git a/vendor/vendor.json b/vendor/vendor.json index b3fc3646f..f6f3cba09 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -2350,34 +2350,34 @@ "revisionTime": "2016-11-10T11:58:56Z" }, { - "checksumSHA1": "QDbbtubwRml+xdgIfNy/yC6Ff78=", + "checksumSHA1": "SIsWfZXQERRErpy9TD1ETop72uU=", "path": "google.golang.org/api/cloudresourcemanager/v1", - "revision": "43c645d4bcf9251ced36c823a93b6d198764aae4", - "revisionTime": "2016-03-24T17:48:31Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { "checksumSHA1": "wIomSQkpEQ6U71+hZStbt7+ttOQ=", "path": "google.golang.org/api/compute/v1", - "revision": "c8d75a8ec737f9b8b1ed2676c28feedbe21f543f", - "revisionTime": "2016-11-21T18:05:46Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { - "checksumSHA1": "vnUDudEduSBUqwC+jVs6xt1Sm0w=", + "checksumSHA1": "qt8Mg1hYm0ApdGODreQxBh30FDU=", "path": "google.golang.org/api/container/v1", - "revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", - "revisionTime": "2016-08-05T04:28:55Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { - "checksumSHA1": "ij1heqr+F07H75D4og/yUqRFf3I=", + "checksumSHA1": "JYl35km48fLrIx7YUtzcgd4J7Rk=", "path": "google.golang.org/api/dns/v1", - "revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", - "revisionTime": "2016-08-05T04:28:55Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { - "checksumSHA1": "SLzHstPylt3EcBt9yEBJV+JqGp4=", + "checksumSHA1": "I1JSeU5OMapl+4s2VrnBkMon3Bw=", "path": "google.golang.org/api/gensupport", - "revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", - "revisionTime": "2016-08-05T04:28:55Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { "checksumSHA1": "yQREK/OWrz9PLljbr127+xFk6J0=", @@ -2392,28 +2392,28 @@ "revisionTime": "2016-08-05T04:28:55Z" }, { - "checksumSHA1": "NetCfFfklnz0sJXmRPIRJsPKV5Q=", + "checksumSHA1": "+u3FeHSXeRJZzw52OZsT3wUPb24=", "path": "google.golang.org/api/iam/v1", - "revision": "43c645d4bcf9251ced36c823a93b6d198764aae4", - "revisionTime": "2016-03-24T17:48:31Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { - "checksumSHA1": "M7er6A8YuCmllh/cj/fZhHDEb3I=", + "checksumSHA1": "34BpqXixb+aV4iuOioQeSej255Y=", "path": "google.golang.org/api/pubsub/v1", - "revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", - "revisionTime": "2016-08-05T04:28:55Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { - "checksumSHA1": "dpHo8BrIZVf88kAsFoWYuSpG8i4=", + "checksumSHA1": "moKPpECJZQR/mANGD26E7Pbxn4I=", "path": "google.golang.org/api/sqladmin/v1beta4", - "revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", - "revisionTime": "2016-08-05T04:28:55Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { - "checksumSHA1": "qi0hBhwhMRAYlSYFHeHCde+jzAQ=", + "checksumSHA1": "xygm9BwoCg7vc0PPgAPdxNKJ38c=", "path": "google.golang.org/api/storage/v1", - "revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", - "revisionTime": "2016-08-05T04:28:55Z" + "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823", + "revisionTime": "2016-11-27T23:54:21Z" }, { "path": "google.golang.org/appengine",