vendor: update google apis

This commit is contained in:
Dana Hoffman 2016-12-01 12:26:13 -08:00
parent 2d48c4400d
commit d319d4099e
18 changed files with 6550 additions and 1022 deletions

View File

@ -1,11 +1,12 @@
{ {
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/8EOgQpr1bAhvZ8Ay5woGZcfT03Y\"", "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/KWbv1ck4Hir_ldCgHUUAxKHck4c\"",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"id": "cloudresourcemanager:v1", "id": "cloudresourcemanager:v1",
"name": "cloudresourcemanager", "name": "cloudresourcemanager",
"canonicalName": "Cloud Resource Manager",
"version": "v1", "version": "v1",
"revision": "20160225", "revision": "20160927",
"title": "Google Cloud Resource Manager API", "title": "Google Cloud Resource Manager API",
"description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.",
"ownerDomain": "google.com", "ownerDomain": "google.com",
@ -113,6 +114,235 @@
} }
}, },
"schemas": { "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": { "Project": {
"id": "Project", "id": "Project",
"type": "object", "type": "object",
@ -139,7 +369,7 @@
}, },
"name": { "name": {
"type": "string", "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": { "createTime": {
"type": "string", "type": "string",
@ -201,94 +431,234 @@
"type": "object", "type": "object",
"description": "The request sent to the UndeleteProject method." "description": "The request sent to the UndeleteProject method."
}, },
"GetIamPolicyRequest": { "ProjectCreationStatus": {
"id": "GetIamPolicyRequest", "id": "ProjectCreationStatus",
"type": "object", "type": "object",
"description": "Request message for `GetIamPolicy` method." "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.",
},
"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": { "properties": {
"version": { "createTime": {
"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", "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.", "description": "Creation time of the project creation workflow."
"format": "byte" },
"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."
} }
} }
}, },
"Binding": { "FolderOperation": {
"id": "Binding", "id": "FolderOperation",
"type": "object", "type": "object",
"description": "Associates `members` with a `role`.", "description": "Metadata describing a long running folder operation",
"properties": { "properties": {
"role": { "displayName": {
"type": "string", "type": "string",
"description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. Required" "description": "The display name of the folder."
}, },
"members": { "operationType": {
"type": "array", "type": "string",
"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`.", "description": "The type of this operation.",
"items": { "enum": [
"type": "string" "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."
} }
} }
}, },
"SetIamPolicyRequest": { "FolderOperationError": {
"id": "SetIamPolicyRequest", "id": "FolderOperationError",
"type": "object", "type": "object",
"description": "Request message for `SetIamPolicy` method.", "description": "A classification of the Folder Operation error.",
"properties": { "properties": {
"policy": { "errorMessageId": {
"$ref": "Policy", "type": "string",
"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." "description": "The type of operation error experienced.",
} "enum": [
} "ERROR_TYPE_UNSPECIFIED",
}, "FOLDER_HEIGHT_VIOLATION",
"TestIamPermissionsRequest": { "MAX_CHILD_FOLDERS_VIOLATION",
"id": "TestIamPermissionsRequest", "FOLDER_NAME_UNIQUENESS_VIOLATION",
"type": "object", "RESOURCE_DELETED",
"description": "Request message for `TestIamPermissions` method.", "PARENT_DELETED",
"properties": { "CYCLE_INTRODUCED_ERROR",
"permissions": { "FOLDER_ALREADY_BEING_MOVED",
"type": "array", "FOLDER_TO_DELETE_NON_EMPTY"
"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"
}
} }
} }
} }
}, },
"resources": { "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": { "projects": {
"methods": { "methods": {
"get": { "get": {
@ -346,6 +716,21 @@
"https://www.googleapis.com/auth/cloud-platform.read-only" "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": { "update": {
"id": "cloudresourcemanager.projects.update", "id": "cloudresourcemanager.projects.update",
"path": "v1/projects/{projectId}", "path": "v1/projects/{projectId}",
@ -376,7 +761,7 @@
"id": "cloudresourcemanager.projects.delete", "id": "cloudresourcemanager.projects.delete",
"path": "v1/projects/{projectId}", "path": "v1/projects/{projectId}",
"httpMethod": "DELETE", "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": { "parameters": {
"projectId": { "projectId": {
"type": "string", "type": "string",
@ -399,7 +784,7 @@
"id": "cloudresourcemanager.projects.undelete", "id": "cloudresourcemanager.projects.undelete",
"path": "v1/projects/{projectId}:undelete", "path": "v1/projects/{projectId}:undelete",
"httpMethod": "POST", "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": { "parameters": {
"projectId": { "projectId": {
"type": "string", "type": "string",
@ -429,7 +814,7 @@
"parameters": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"location": "path" "location": "path"
} }
@ -452,11 +837,11 @@
"id": "cloudresourcemanager.projects.setIamPolicy", "id": "cloudresourcemanager.projects.setIamPolicy",
"path": "v1/projects/{resource}:setIamPolicy", "path": "v1/projects/{resource}:setIamPolicy",
"httpMethod": "POST", "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": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"location": "path" "location": "path"
} }
@ -482,7 +867,7 @@
"parameters": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"location": "path" "location": "path"
} }

File diff suppressed because it is too large Load Diff

View File

@ -154,12 +154,21 @@ type AddonsConfig struct {
// field is empty or not. This may be used to include empty fields in // field is empty or not. This may be used to include empty fields in
// Patch requests. // Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *AddonsConfig) MarshalJSON() ([]byte, error) {
type noMethod AddonsConfig type noMethod AddonsConfig
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// Cluster: A Google Container Engine cluster. // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *Cluster) MarshalJSON() ([]byte, error) {
type noMethod Cluster type noMethod Cluster
raw := noMethod(*s) 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. // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ClusterUpdate) MarshalJSON() ([]byte, error) {
type noMethod ClusterUpdate type noMethod ClusterUpdate
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// CreateClusterRequest: CreateClusterRequest creates a cluster. // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) {
type noMethod CreateClusterRequest type noMethod CreateClusterRequest
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// CreateNodePoolRequest: CreateNodePoolRequest creates a node pool for // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *CreateNodePoolRequest) MarshalJSON() ([]byte, error) {
type noMethod CreateNodePoolRequest type noMethod CreateNodePoolRequest
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// HorizontalPodAutoscaling: Configuration options for the horizontal // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *HorizontalPodAutoscaling) MarshalJSON() ([]byte, error) {
type noMethod HorizontalPodAutoscaling type noMethod HorizontalPodAutoscaling
raw := noMethod(*s) 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 // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *HttpLoadBalancing) MarshalJSON() ([]byte, error) {
type noMethod HttpLoadBalancing type noMethod HttpLoadBalancing
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// ListClustersResponse: ListClustersResponse is the result of // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
type noMethod ListClustersResponse type noMethod ListClustersResponse
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// ListNodePoolsResponse: ListNodePoolsResponse is the result of // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ListNodePoolsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListNodePoolsResponse type noMethod ListNodePoolsResponse
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// ListOperationsResponse: ListOperationsResponse is the result of // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListOperationsResponse type noMethod ListOperationsResponse
raw := noMethod(*s) 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 // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *MasterAuth) MarshalJSON() ([]byte, error) {
type noMethod MasterAuth type noMethod MasterAuth
raw := noMethod(*s) 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. // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *NodeConfig) MarshalJSON() ([]byte, error) {
type noMethod NodeConfig type noMethod NodeConfig
raw := noMethod(*s) 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 // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *NodePool) MarshalJSON() ([]byte, error) {
type noMethod NodePool type noMethod NodePool
raw := noMethod(*s) 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 // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *Operation) MarshalJSON() ([]byte, error) {
type noMethod Operation type noMethod Operation
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// ServerConfig: Container Engine service configuration. // 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 // field is empty or not. This may be used to include empty fields in
// Patch requests. // Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ServerConfig) MarshalJSON() ([]byte, error) {
type noMethod ServerConfig type noMethod ServerConfig
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// UpdateClusterRequest: UpdateClusterRequest updates the settings of a // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) {
type noMethod UpdateClusterRequest type noMethod UpdateClusterRequest
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// method id "container.projects.zones.getServerconfig": // method id "container.projects.zones.getServerconfig":
@ -840,6 +972,7 @@ type ProjectsZonesGetServerconfigCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// GetServerconfig: Returns configuration info about the Container // GetServerconfig: Returns configuration info about the Container
@ -877,8 +1010,20 @@ func (c *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *Project
return c 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) { func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -975,6 +1120,7 @@ type ProjectsZonesClustersCreateCall struct {
createclusterrequest *CreateClusterRequest createclusterrequest *CreateClusterRequest
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Create: Creates a cluster, consisting of the specified number and // Create: Creates a cluster, consisting of the specified number and
@ -1010,8 +1156,20 @@ func (c *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *Projects
return c 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) { func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest)
@ -1113,6 +1271,7 @@ type ProjectsZonesClustersDeleteCall struct {
clusterId string clusterId string
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Delete: Deletes the cluster, including the Kubernetes endpoint and // Delete: Deletes the cluster, including the Kubernetes endpoint and
@ -1145,8 +1304,20 @@ func (c *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *Projects
return c 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) { func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
c.urlParams_.Set("alt", alt) c.urlParams_.Set("alt", alt)
@ -1249,6 +1420,7 @@ type ProjectsZonesClustersGetCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Get: Gets the details of a specific cluster. // Get: Gets the details of a specific cluster.
@ -1286,8 +1458,20 @@ func (c *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZon
return c 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) { func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -1392,6 +1576,7 @@ type ProjectsZonesClustersListCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// List: Lists all clusters owned by a project in either the specified // 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 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) { func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -1528,6 +1725,7 @@ type ProjectsZonesClustersUpdateCall struct {
updateclusterrequest *UpdateClusterRequest updateclusterrequest *UpdateClusterRequest
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Update: Updates the settings of a specific cluster. // Update: Updates the settings of a specific cluster.
@ -1556,8 +1754,20 @@ func (c *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *Projects
return c 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) { func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest) body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest)
@ -1668,6 +1878,7 @@ type ProjectsZonesClustersNodePoolsCreateCall struct {
createnodepoolrequest *CreateNodePoolRequest createnodepoolrequest *CreateNodePoolRequest
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Create: Creates a node pool for a cluster. // Create: Creates a node pool for a cluster.
@ -1696,8 +1907,20 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) Context(ctx context.Context)
return c 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) { func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest) body, err := googleapi.WithoutDataWrapper.JSONReader(c.createnodepoolrequest)
@ -1808,6 +2031,7 @@ type ProjectsZonesClustersNodePoolsDeleteCall struct {
nodePoolId string nodePoolId string
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Delete: Deletes a node pool from a cluster. // Delete: Deletes a node pool from a cluster.
@ -1836,8 +2060,20 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Context(ctx context.Context)
return c 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) { func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
c.urlParams_.Set("alt", alt) c.urlParams_.Set("alt", alt)
@ -1949,6 +2185,7 @@ type ProjectsZonesClustersNodePoolsGetCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Get: Retrieves the node pool requested. // Get: Retrieves the node pool requested.
@ -1987,8 +2224,20 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Context(ctx context.Context) *Pr
return c 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) { func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -2102,6 +2351,7 @@ type ProjectsZonesClustersNodePoolsListCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// List: Lists the node pools for a cluster. // List: Lists the node pools for a cluster.
@ -2139,8 +2389,20 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Context(ctx context.Context) *P
return c 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) { func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -2246,6 +2508,7 @@ type ProjectsZonesOperationsGetCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Get: Gets the specified operation. // Get: Gets the specified operation.
@ -2283,8 +2546,20 @@ func (c *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZ
return c 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) { func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -2389,6 +2664,7 @@ type ProjectsZonesOperationsListCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// List: Lists all operations in a project in a specific zone or all // 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 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) { func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)

View File

@ -1,18 +1,18 @@
{ {
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/ctEt-71wWAltEdgLnIcGLfJZeFE\"", "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/RqBsQyB2YZT-ZAkK7pcLByI9SZs\"",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"id": "dns:v1", "id": "dns:v1",
"name": "dns", "name": "dns",
"version": "v1", "version": "v1",
"revision": "20160413", "revision": "20161110",
"title": "Google Cloud DNS API", "title": "Google Cloud DNS API",
"description": "Configures and serves authoritative DNS records.", "description": "Configures and serves authoritative DNS records.",
"ownerDomain": "google.com", "ownerDomain": "google.com",
"ownerName": "Google", "ownerName": "Google",
"icons": { "icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif", "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "http://www.google.com/images/icons/product/search-32.gif" "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
}, },
"documentationLink": "https://developers.google.com/cloud-dns", "documentationLink": "https://developers.google.com/cloud-dns",
"protocol": "rest", "protocol": "rest",
@ -183,7 +183,7 @@
}, },
"name": { "name": {
"type": "string", "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": { "nameServerSet": {
"type": "string", "type": "string",

View File

@ -168,12 +168,20 @@ type Change struct {
// server regardless of whether the field is empty or not. This may be // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *Change) MarshalJSON() ([]byte, error) {
type noMethod Change type noMethod Change
raw := noMethod(*s) 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 // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ChangesListResponse) MarshalJSON() ([]byte, error) {
type noMethod ChangesListResponse type noMethod ChangesListResponse
raw := noMethod(*s) 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 // ManagedZone: A zone is a subtree of the DNS namespace under one
@ -243,7 +259,7 @@ type ManagedZone struct {
Kind string `json:"kind,omitempty"` Kind string `json:"kind,omitempty"`
// Name: User assigned name for this resource. Must be unique within the // 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 // letter, end with a letter or digit, and only contain lowercase
// letters, digits or dashes. // letters, digits or dashes.
Name string `json:"name,omitempty"` 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ManagedZone) MarshalJSON() ([]byte, error) {
type noMethod ManagedZone type noMethod ManagedZone
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
type ManagedZonesListResponse struct { type ManagedZonesListResponse struct {
@ -307,12 +331,20 @@ type ManagedZonesListResponse struct {
// server regardless of whether the field is empty or not. This may be // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) {
type noMethod ManagedZonesListResponse type noMethod ManagedZonesListResponse
raw := noMethod(*s) 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 // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` ForceSendFields []string `json:"-"`
// NullFields is a list of field names (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) { func (s *Project) MarshalJSON() ([]byte, error) {
type noMethod Project type noMethod Project
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// Quota: Limits associated with a Project. // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *Quota) MarshalJSON() ([]byte, error) {
type noMethod Quota type noMethod Quota
raw := noMethod(*s) 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 // 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 // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) {
type noMethod ResourceRecordSet type noMethod ResourceRecordSet
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
type ResourceRecordSetsListResponse struct { type ResourceRecordSetsListResponse struct {
@ -464,12 +520,20 @@ type ResourceRecordSetsListResponse struct {
// server regardless of whether the field is empty or not. This may be // server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests. // used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"` 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) { func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) {
type noMethod ResourceRecordSetsListResponse type noMethod ResourceRecordSetsListResponse
raw := noMethod(*s) raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
} }
// method id "dns.changes.create": // method id "dns.changes.create":
@ -481,6 +545,7 @@ type ChangesCreateCall struct {
change *Change change *Change
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Create: Atomically update the ResourceRecordSet collection. // Create: Atomically update the ResourceRecordSet collection.
@ -508,8 +573,20 @@ func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
return c 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) { func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.change) body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
@ -613,6 +690,7 @@ type ChangesGetCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Get: Fetch the representation of an existing Change. // Get: Fetch the representation of an existing Change.
@ -650,8 +728,20 @@ func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
return c 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) { func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -759,6 +849,7 @@ type ChangesListCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// List: Enumerate Changes to a ResourceRecordSet collection. // List: Enumerate Changes to a ResourceRecordSet collection.
@ -828,8 +919,20 @@ func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
return c 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) { func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -977,6 +1080,7 @@ type ManagedZonesCreateCall struct {
managedzone *ManagedZone managedzone *ManagedZone
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Create: Create a new ManagedZone. // Create: Create a new ManagedZone.
@ -1003,8 +1107,20 @@ func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreat
return c 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) { func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone) body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
@ -1098,6 +1214,7 @@ type ManagedZonesDeleteCall struct {
managedZone string managedZone string
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Delete: Delete a previously created ManagedZone. // Delete: Delete a previously created ManagedZone.
@ -1124,8 +1241,20 @@ func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDelet
return c 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) { func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil var body io.Reader = nil
c.urlParams_.Set("alt", alt) c.urlParams_.Set("alt", alt)
@ -1192,6 +1321,7 @@ type ManagedZonesGetCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Get: Fetch the representation of an existing ManagedZone. // Get: Fetch the representation of an existing ManagedZone.
@ -1228,8 +1358,20 @@ func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall
return c 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) { func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -1328,6 +1470,7 @@ type ManagedZonesListCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// List: Enumerate ManagedZones that have been created but not yet // List: Enumerate ManagedZones that have been created but not yet
@ -1387,8 +1530,20 @@ func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCal
return c 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) { func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -1516,6 +1671,7 @@ type ProjectsGetCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// Get: Fetch the representation of an existing Project. // Get: Fetch the representation of an existing Project.
@ -1551,8 +1707,20 @@ func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
return c 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) { func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
@ -1644,6 +1812,7 @@ type ResourceRecordSetsListCall struct {
urlParams_ gensupport.URLParams urlParams_ gensupport.URLParams
ifNoneMatch_ string ifNoneMatch_ string
ctx_ context.Context ctx_ context.Context
header_ http.Header
} }
// List: Enumerate ResourceRecordSets that have been created but not yet // List: Enumerate ResourceRecordSets that have been created but not yet
@ -1712,8 +1881,20 @@ func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecor
return c 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) { func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header) reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent()) reqHeaders.Set("User-Agent", c.s.userAgent())
if c.ifNoneMatch_ != "" { if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) reqHeaders.Set("If-None-Match", c.ifNoneMatch_)

View File

@ -12,13 +12,13 @@ import (
) )
// MarshalJSON returns a JSON encoding of schema containing only selected fields. // MarshalJSON returns a JSON encoding of schema containing only selected fields.
// A field is selected if: // A field is selected if any of the following is true:
// * it has a non-empty value, or // * it has a non-empty value
// * its field name is present in forceSendFields, and // * its field name is present in forceSendFields and it is not a nil pointer or nil interface
// * 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. // The JSON key for each selected field is taken from the field's json: struct tag.
func MarshalJSON(schema interface{}, forceSendFields []string) ([]byte, error) { func MarshalJSON(schema interface{}, forceSendFields, nullFields []string) ([]byte, error) {
if len(forceSendFields) == 0 { if len(forceSendFields) == 0 && len(nullFields) == 0 {
return json.Marshal(schema) return json.Marshal(schema)
} }
@ -26,15 +26,19 @@ func MarshalJSON(schema interface{}, forceSendFields []string) ([]byte, error) {
for _, f := range forceSendFields { for _, f := range forceSendFields {
mustInclude[f] = struct{}{} 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 { if err != nil {
return nil, err return nil, err
} }
return json.Marshal(dataMap) 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{}) m := make(map[string]interface{})
s := reflect.ValueOf(schema) s := reflect.ValueOf(schema)
st := s.Type() st := s.Type()
@ -54,6 +58,14 @@ func schemaToMap(schema interface{}, mustInclude map[string]struct{}) (map[strin
v := s.Field(i) v := s.Field(i)
f := st.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) { if !includeField(v, f, mustInclude) {
continue continue
} }

View File

@ -5,6 +5,7 @@
package gensupport package gensupport
import ( import (
"errors"
"fmt" "fmt"
"io" "io"
"net/http" "net/http"
@ -12,14 +13,9 @@ import (
"time" "time"
"golang.org/x/net/context" "golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
) )
const ( 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 // statusTooManyRequests is returned by the storage API if the
// per-project limits have been temporarily exceeded. The request // per-project limits have been temporarily exceeded. The request
// should be retried. // 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-Range", contentRange)
req.Header.Set("Content-Type", rx.MediaType) req.Header.Set("Content-Type", rx.MediaType)
req.Header.Set("User-Agent", rx.UserAgent) 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. // 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 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)) rx.reportProgress(off, off+int64(size))
} }
if res.StatusCode == statusResumeIncomplete { if statusResumeIncomplete(res) {
rx.Media.Next() rx.Media.Next()
} }
return res, nil 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 // It retries using the provided back off strategy until cancelled or the
// strategy indicates to stop retrying. // strategy indicates to stop retrying.
// It is called from the auto-generated API code and is not visible to the user. // 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 // Before sending an HTTP request, Upload calls any registered hook functions,
// it subsequently calls with the HTTP response. // and calls the returned functions after the request returns (see send.go).
// rx is private to the auto-generated API code. // 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. // 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) { 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 // If the chunk was uploaded successfully, but there's still
// more to go, upload the next chunk without any delay. // more to go, upload the next chunk without any delay.
if status == statusResumeIncomplete { if statusResumeIncomplete(resp) {
pause = 0 pause = 0
backoff.Reset() backoff.Reset()
resp.Body.Close() resp.Body.Close()

View File

@ -55,23 +55,17 @@ func DefaultBackoffStrategy() BackoffStrategy {
// shouldRetry returns true if the HTTP response / error indicates that the // shouldRetry returns true if the HTTP response / error indicates that the
// request should be attempted again. // request should be attempted again.
func shouldRetry(status int, err error) bool { func shouldRetry(status int, err error) bool {
// Retry for 5xx response codes. if 500 <= status && status <= 599 {
if 500 <= status && status < 600 {
return true return true
} }
// Retry on statusTooManyRequests{
if status == statusTooManyRequests { if status == statusTooManyRequests {
return true return true
} }
// Retry on unexpected EOFs and temporary network errors.
if err == io.ErrUnexpectedEOF { if err == io.ErrUnexpectedEOF {
return true return true
} }
if err, ok := err.(net.Error); ok { if err, ok := err.(net.Error); ok {
return err.Temporary() return err.Temporary()
} }
return false return false
} }

View File

@ -11,25 +11,45 @@ import (
"golang.org/x/net/context/ctxhttp" "golang.org/x/net/context/ctxhttp"
) )
// Hook is a function that is called once before each HTTP request that is sent // Hook is the type of a function that is called once before each HTTP request
// by a generated API. It returns a function that is called after the request // that is sent by a generated API. It returns a function that is called after
// returns. // the request returns.
// Hook is never called if the context is nil. // Hooks are not called if the context is nil.
var Hook func(ctx context.Context, req *http.Request) func(resp *http.Response) = defaultHook 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) { var hooks []Hook
return func(resp *http.Response) {}
// 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. // SendRequest sends a single HTTP request using the given client.
// If ctx is non-nil, uses ctxhttp.Do, and calls Hook beforehand. The function // If ctx is non-nil, it calls all hooks, then sends the request with
// returned by Hook is called after the request returns. // 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) { func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
if ctx != nil { if ctx == nil {
fn := Hook(ctx, req)
resp, err := ctxhttp.Do(ctx, client, req)
fn(resp)
return resp, err
}
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
}

View File

@ -1,12 +1,13 @@
{ {
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/KGIJuBPLol6TqL9arf5YOmp-wQ0\"", "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/bQX0iw41CX8vYvVm7WSKLdyxMvI\"",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"id": "iam:v1", "id": "iam:v1",
"name": "iam", "name": "iam",
"canonicalName": "iam",
"version": "v1", "version": "v1",
"revision": "20160129", "revision": "20160915",
"title": "Google Identity and Access Management API", "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.", "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", "ownerDomain": "google.com",
"ownerName": "Google", "ownerName": "Google",
@ -125,18 +126,18 @@
}, },
"nextPageToken": { "nextPageToken": {
"type": "string", "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": { "ServiceAccount": {
"id": "ServiceAccount", "id": "ServiceAccount",
"type": "object", "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": { "properties": {
"name": { "name": {
"type": "string", "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": { "projectId": {
"type": "string", "type": "string",
@ -144,11 +145,11 @@
}, },
"uniqueId": { "uniqueId": {
"type": "string", "type": "string",
"description": "@OutputOnly unique and stable id of the service account." "description": "@OutputOnly The unique and stable id of the service account."
}, },
"email": { "email": {
"type": "string", "type": "string",
"description": "@OutputOnly Email address of the service account." "description": "@OutputOnly The email address of the service account."
}, },
"displayName": { "displayName": {
"type": "string", "type": "string",
@ -172,11 +173,11 @@
"properties": { "properties": {
"accountId": { "accountId": {
"type": "string", "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": { "serviceAccount": {
"$ref": "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": { "ServiceAccountKey": {
"id": "ServiceAccountKey", "id": "ServiceAccountKey",
"type": "object", "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": { "properties": {
"name": { "name": {
"type": "string", "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": { "privateKeyType": {
"type": "string", "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": [ "enum": [
"TYPE_UNSPECIFIED", "TYPE_UNSPECIFIED",
"TYPE_PKCS12_FILE", "TYPE_PKCS12_FILE",
"TYPE_GOOGLE_CREDENTIALS_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": { "privateKeyData": {
"type": "string", "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" "format": "byte"
}, },
"validAfterTime": { "validAfterTime": {
@ -239,12 +254,21 @@
"properties": { "properties": {
"privateKeyType": { "privateKeyType": {
"type": "string", "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": [ "enum": [
"TYPE_UNSPECIFIED", "TYPE_UNSPECIFIED",
"TYPE_PKCS12_FILE", "TYPE_PKCS12_FILE",
"TYPE_GOOGLE_CREDENTIALS_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": { "properties": {
"bytesToSign": { "bytesToSign": {
"type": "string", "type": "string",
"description": "The bytes to sign", "description": "The bytes to sign.",
"format": "byte" "format": "byte"
} }
} }
@ -279,7 +303,7 @@
"Policy": { "Policy": {
"id": "Policy", "id": "Policy",
"type": "object", "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": { "properties": {
"version": { "version": {
"type": "integer", "type": "integer",
@ -293,12 +317,6 @@
"$ref": "Binding" "$ref": "Binding"
} }
}, },
"rules": {
"type": "array",
"items": {
"$ref": "Rule"
}
},
"etag": { "etag": {
"type": "string", "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.", "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": { "SetIamPolicyRequest": {
"id": "SetIamPolicyRequest", "id": "SetIamPolicyRequest",
"type": "object", "type": "object",
@ -498,7 +360,7 @@
"properties": { "properties": {
"permissions": { "permissions": {
"type": "array", "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": { "items": {
"type": "string" "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": { "resources": {
@ -529,24 +484,24 @@
"id": "iam.projects.serviceAccounts.list", "id": "iam.projects.serviceAccounts.list",
"path": "v1/{+name}/serviceAccounts", "path": "v1/{+name}/serviceAccounts",
"httpMethod": "GET", "httpMethod": "GET",
"description": "Lists service accounts for a project.", "description": "Lists ServiceAccounts for a project.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*$", "pattern": "^projects/[^/]*$",
"location": "path" "location": "path"
}, },
"pageSize": { "pageSize": {
"type": "integer", "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", "format": "int32",
"location": "query" "location": "query"
}, },
"pageToken": { "pageToken": {
"type": "string", "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" "location": "query"
} }
}, },
@ -564,11 +519,11 @@
"id": "iam.projects.serviceAccounts.get", "id": "iam.projects.serviceAccounts.get",
"path": "v1/{+name}", "path": "v1/{+name}",
"httpMethod": "GET", "httpMethod": "GET",
"description": "Gets a ServiceAccount", "description": "Gets a ServiceAccount.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -588,11 +543,11 @@
"id": "iam.projects.serviceAccounts.create", "id": "iam.projects.serviceAccounts.create",
"path": "v1/{+name}/serviceAccounts", "path": "v1/{+name}/serviceAccounts",
"httpMethod": "POST", "httpMethod": "POST",
"description": "Creates a service account and returns it.", "description": "Creates a ServiceAccount and returns it.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*$", "pattern": "^projects/[^/]*$",
"location": "path" "location": "path"
@ -615,11 +570,11 @@
"id": "iam.projects.serviceAccounts.update", "id": "iam.projects.serviceAccounts.update",
"path": "v1/{+name}", "path": "v1/{+name}",
"httpMethod": "PUT", "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": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -642,11 +597,11 @@
"id": "iam.projects.serviceAccounts.delete", "id": "iam.projects.serviceAccounts.delete",
"path": "v1/{+name}", "path": "v1/{+name}",
"httpMethod": "DELETE", "httpMethod": "DELETE",
"description": "Deletes a service acount.", "description": "Deletes a ServiceAccount.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -666,11 +621,11 @@
"id": "iam.projects.serviceAccounts.signBlob", "id": "iam.projects.serviceAccounts.signBlob",
"path": "v1/{+name}:signBlob", "path": "v1/{+name}:signBlob",
"httpMethod": "POST", "httpMethod": "POST",
"description": "Signs a blob using a service account.", "description": "Signs a blob using a service account's system-managed private key.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -693,11 +648,11 @@
"id": "iam.projects.serviceAccounts.getIamPolicy", "id": "iam.projects.serviceAccounts.getIamPolicy",
"path": "v1/{+resource}:getIamPolicy", "path": "v1/{+resource}:getIamPolicy",
"httpMethod": "POST", "httpMethod": "POST",
"description": "Returns the IAM access control policy for specified IAM resource.", "description": "Returns the IAM access control policy for a ServiceAccount.",
"parameters": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -717,11 +672,11 @@
"id": "iam.projects.serviceAccounts.setIamPolicy", "id": "iam.projects.serviceAccounts.setIamPolicy",
"path": "v1/{+resource}:setIamPolicy", "path": "v1/{+resource}:setIamPolicy",
"httpMethod": "POST", "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": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -744,11 +699,11 @@
"id": "iam.projects.serviceAccounts.testIamPermissions", "id": "iam.projects.serviceAccounts.testIamPermissions",
"path": "v1/{+resource}:testIamPermissions", "path": "v1/{+resource}:testIamPermissions",
"httpMethod": "POST", "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": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -775,18 +730,18 @@
"id": "iam.projects.serviceAccounts.keys.list", "id": "iam.projects.serviceAccounts.keys.list",
"path": "v1/{+name}/keys", "path": "v1/{+name}/keys",
"httpMethod": "GET", "httpMethod": "GET",
"description": "Lists service account keys", "description": "Lists ServiceAccountKeys.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
}, },
"keyTypes": { "keyTypes": {
"type": "string", "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": [ "enum": [
"KEY_TYPE_UNSPECIFIED", "KEY_TYPE_UNSPECIFIED",
"USER_MANAGED", "USER_MANAGED",
@ -814,10 +769,20 @@
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$",
"location": "path" "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": [ "parameterOrder": [
@ -834,11 +799,11 @@
"id": "iam.projects.serviceAccounts.keys.create", "id": "iam.projects.serviceAccounts.keys.create",
"path": "v1/{+name}/keys", "path": "v1/{+name}/keys",
"httpMethod": "POST", "httpMethod": "POST",
"description": "Creates a service account key and returns it.", "description": "Creates a ServiceAccountKey and returns it.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*$",
"location": "path" "location": "path"
@ -861,11 +826,11 @@
"id": "iam.projects.serviceAccounts.keys.delete", "id": "iam.projects.serviceAccounts.keys.delete",
"path": "v1/{+name}", "path": "v1/{+name}",
"httpMethod": "DELETE", "httpMethod": "DELETE",
"description": "Deletes a service account key.", "description": "Deletes a ServiceAccountKey.",
"parameters": { "parameters": {
"name": { "name": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$", "pattern": "^projects/[^/]*/serviceAccounts/[^/]*/keys/[^/]*$",
"location": "path" "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"
]
}
}
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
{ {
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/liyzgLngirW3xU7Tt2Pd1AnSK1c\"", "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/HIsdIvCDXEirzqtPtZbE0wV3MKA\"",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"id": "pubsub:v1", "id": "pubsub:v1",
"name": "pubsub", "name": "pubsub",
"version": "v1", "version": "v1",
"revision": "20160317", "revision": "20161003",
"title": "Google Cloud Pub/Sub API", "title": "Google Cloud Pub/Sub API",
"description": "Provides reliable, many-to-many, asynchronous messaging between applications.", "description": "Provides reliable, many-to-many, asynchronous messaging between applications.",
"ownerDomain": "google.com", "ownerDomain": "google.com",
@ -173,7 +173,7 @@
"properties": { "properties": {
"permissions": { "permissions": {
"type": "array", "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": { "items": {
"type": "string" "type": "string"
} }
@ -226,7 +226,7 @@
"properties": { "properties": {
"data": { "data": {
"type": "string", "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" "format": "byte"
}, },
"attributes": { "attributes": {
@ -320,7 +320,7 @@
}, },
"ackDeadlineSeconds": { "ackDeadlineSeconds": {
"type": "integer", "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" "format": "int32"
} }
} }
@ -464,7 +464,7 @@
"parameters": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/topics/[^/]*$", "pattern": "^projects/[^/]*/topics/[^/]*$",
"location": "path" "location": "path"
@ -488,11 +488,11 @@
"id": "pubsub.projects.topics.getIamPolicy", "id": "pubsub.projects.topics.getIamPolicy",
"path": "v1/{+resource}:getIamPolicy", "path": "v1/{+resource}:getIamPolicy",
"httpMethod": "GET", "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": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/topics/[^/]*$", "pattern": "^projects/[^/]*/topics/[^/]*$",
"location": "path" "location": "path"
@ -517,7 +517,7 @@
"parameters": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/topics/[^/]*$", "pattern": "^projects/[^/]*/topics/[^/]*$",
"location": "path" "location": "path"
@ -733,7 +733,7 @@
"parameters": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/subscriptions/[^/]*$", "pattern": "^projects/[^/]*/subscriptions/[^/]*$",
"location": "path" "location": "path"
@ -757,11 +757,11 @@
"id": "pubsub.projects.subscriptions.getIamPolicy", "id": "pubsub.projects.subscriptions.getIamPolicy",
"path": "v1/{+resource}:getIamPolicy", "path": "v1/{+resource}:getIamPolicy",
"httpMethod": "GET", "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": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/subscriptions/[^/]*$", "pattern": "^projects/[^/]*/subscriptions/[^/]*$",
"location": "path" "location": "path"
@ -786,7 +786,7 @@
"parameters": { "parameters": {
"resource": { "resource": {
"type": "string", "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, "required": true,
"pattern": "^projects/[^/]*/subscriptions/[^/]*$", "pattern": "^projects/[^/]*/subscriptions/[^/]*$",
"location": "path" "location": "path"
@ -810,7 +810,7 @@
"id": "pubsub.projects.subscriptions.create", "id": "pubsub.projects.subscriptions.create",
"path": "v1/{+name}", "path": "v1/{+name}",
"httpMethod": "PUT", "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": { "parameters": {
"name": { "name": {
"type": "string", "type": "string",
@ -899,7 +899,7 @@
"id": "pubsub.projects.subscriptions.delete", "id": "pubsub.projects.subscriptions.delete",
"path": "v1/{+subscription}", "path": "v1/{+subscription}",
"httpMethod": "DELETE", "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": { "parameters": {
"subscription": { "subscription": {
"type": "string", "type": "string",
@ -924,7 +924,7 @@
"id": "pubsub.projects.subscriptions.modifyAckDeadline", "id": "pubsub.projects.subscriptions.modifyAckDeadline",
"path": "v1/{+subscription}:modifyAckDeadline", "path": "v1/{+subscription}:modifyAckDeadline",
"httpMethod": "POST", "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": { "parameters": {
"subscription": { "subscription": {
"type": "string", "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"
]
}
}
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,19 @@
{ {
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/Bw6HlPfCUqTIhF647hFuWCHD0c8\"", "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/0q1bgr0rR6WxzzPOS6Rfltu7D84\"",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"id": "sqladmin:v1beta4", "id": "sqladmin:v1beta4",
"name": "sqladmin", "name": "sqladmin",
"canonicalName": "SQL Admin", "canonicalName": "SQL Admin",
"version": "v1beta4", "version": "v1beta4",
"revision": "20160712", "revision": "20161115",
"title": "Cloud SQL Administration API", "title": "Cloud SQL Administration API",
"description": "Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.", "description": "Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.",
"ownerDomain": "google.com", "ownerDomain": "google.com",
"ownerName": "Google", "ownerName": "Google",
"icons": { "icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif", "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "http://www.google.com/images/icons/product/search-32.gif" "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
}, },
"documentationLink": "https://cloud.google.com/sql/docs/reference/latest", "documentationLink": "https://cloud.google.com/sql/docs/reference/latest",
"protocol": "rest", "protocol": "rest",
@ -333,6 +333,10 @@
"type": "string", "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." "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": { "currentDiskSize": {
"type": "string", "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.", "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", "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.", "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" "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": { "region": {
"type": "array", "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": { "items": {
"type": "string" "type": "string"
} }
@ -1482,7 +1490,7 @@
"id": "sql.backupRuns.insert", "id": "sql.backupRuns.insert",
"path": "projects/{project}/instances/{instance}/backupRuns", "path": "projects/{project}/instances/{instance}/backupRuns",
"httpMethod": "POST", "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": { "parameters": {
"instance": { "instance": {
"type": "string", "type": "string",
@ -1506,7 +1514,11 @@
}, },
"response": { "response": {
"$ref": "Operation" "$ref": "Operation"
} },
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"
]
}, },
"list": { "list": {
"id": "sql.backupRuns.list", "id": "sql.backupRuns.list",

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
{ {
"kind": "discovery#restDescription", "kind": "discovery#restDescription",
"etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/WoNfwvHOxLFHVTodCpDiAsVbMpQ\"", "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/sMgjc4eoIFjgub4daTU-MGW0WMA\"",
"discoveryVersion": "v1", "discoveryVersion": "v1",
"id": "storage:v1", "id": "storage:v1",
"name": "storage", "name": "storage",
"version": "v1", "version": "v1",
"revision": "20160714", "revision": "20161109",
"title": "Cloud Storage JSON API", "title": "Cloud Storage JSON API",
"description": "Stores and retrieves potentially large, immutable data objects.", "description": "Stores and retrieves potentially large, immutable data objects.",
"ownerDomain": "google.com", "ownerDomain": "google.com",
@ -177,9 +177,13 @@
"type": "object", "type": "object",
"description": "The action to take.", "description": "The action to take.",
"properties": { "properties": {
"storageClass": {
"type": "string",
"description": "Target storage class. Required iff the type of the action is SetStorageClass."
},
"type": { "type": {
"type": "string", "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", "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." "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": { "numNewerVersions": {
"type": "integer", "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.", "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": { "storageClass": {
"type": "string", "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": { "timeCreated": {
"type": "string", "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.", "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" "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": { "updated": {
"type": "string", "type": "string",
"description": "The modification time of the object metadata in RFC 3339 format.", "description": "The modification time of the object metadata in RFC 3339 format.",
@ -700,7 +716,13 @@
}, },
"entity": { "entity": {
"type": "string", "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": { "entityId": {
"type": "string", "type": "string",
@ -712,7 +734,7 @@
}, },
"generation": { "generation": {
"type": "string", "type": "string",
"description": "The content generation of the object.", "description": "The content generation of the object, if applied to an object.",
"format": "int64" "format": "int64"
}, },
"id": { "id": {
@ -726,7 +748,7 @@
}, },
"object": { "object": {
"type": "string", "type": "string",
"description": "The name of the object." "description": "The name of the object, if applied to an object."
}, },
"projectTeam": { "projectTeam": {
"type": "object", "type": "object",
@ -744,7 +766,13 @@
}, },
"role": { "role": {
"type": "string", "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": { "selfLink": {
"type": "string", "type": "string",
@ -761,7 +789,7 @@
"type": "array", "type": "array",
"description": "The list of items.", "description": "The list of items.",
"items": { "items": {
"type": "any" "$ref": "ObjectAccessControl"
} }
}, },
"kind": { "kind": {
@ -1249,7 +1277,7 @@
"id": "storage.buckets.patch", "id": "storage.buckets.patch",
"path": "b/{bucket}", "path": "b/{bucket}",
"httpMethod": "PATCH", "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": { "parameters": {
"bucket": { "bucket": {
"type": "string", "type": "string",
@ -1341,7 +1369,7 @@
"id": "storage.buckets.update", "id": "storage.buckets.update",
"path": "b/{bucket}", "path": "b/{bucket}",
"httpMethod": "PUT", "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": { "parameters": {
"bucket": { "bucket": {
"type": "string", "type": "string",

File diff suppressed because it is too large Load Diff

52
vendor/vendor.json vendored
View File

@ -2350,34 +2350,34 @@
"revisionTime": "2016-11-10T11:58:56Z" "revisionTime": "2016-11-10T11:58:56Z"
}, },
{ {
"checksumSHA1": "QDbbtubwRml+xdgIfNy/yC6Ff78=", "checksumSHA1": "SIsWfZXQERRErpy9TD1ETop72uU=",
"path": "google.golang.org/api/cloudresourcemanager/v1", "path": "google.golang.org/api/cloudresourcemanager/v1",
"revision": "43c645d4bcf9251ced36c823a93b6d198764aae4", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-03-24T17:48:31Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "wIomSQkpEQ6U71+hZStbt7+ttOQ=", "checksumSHA1": "wIomSQkpEQ6U71+hZStbt7+ttOQ=",
"path": "google.golang.org/api/compute/v1", "path": "google.golang.org/api/compute/v1",
"revision": "c8d75a8ec737f9b8b1ed2676c28feedbe21f543f", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-11-21T18:05:46Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "vnUDudEduSBUqwC+jVs6xt1Sm0w=", "checksumSHA1": "qt8Mg1hYm0ApdGODreQxBh30FDU=",
"path": "google.golang.org/api/container/v1", "path": "google.golang.org/api/container/v1",
"revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-08-05T04:28:55Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "ij1heqr+F07H75D4og/yUqRFf3I=", "checksumSHA1": "JYl35km48fLrIx7YUtzcgd4J7Rk=",
"path": "google.golang.org/api/dns/v1", "path": "google.golang.org/api/dns/v1",
"revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-08-05T04:28:55Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "SLzHstPylt3EcBt9yEBJV+JqGp4=", "checksumSHA1": "I1JSeU5OMapl+4s2VrnBkMon3Bw=",
"path": "google.golang.org/api/gensupport", "path": "google.golang.org/api/gensupport",
"revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-08-05T04:28:55Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "yQREK/OWrz9PLljbr127+xFk6J0=", "checksumSHA1": "yQREK/OWrz9PLljbr127+xFk6J0=",
@ -2392,28 +2392,28 @@
"revisionTime": "2016-08-05T04:28:55Z" "revisionTime": "2016-08-05T04:28:55Z"
}, },
{ {
"checksumSHA1": "NetCfFfklnz0sJXmRPIRJsPKV5Q=", "checksumSHA1": "+u3FeHSXeRJZzw52OZsT3wUPb24=",
"path": "google.golang.org/api/iam/v1", "path": "google.golang.org/api/iam/v1",
"revision": "43c645d4bcf9251ced36c823a93b6d198764aae4", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-03-24T17:48:31Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "M7er6A8YuCmllh/cj/fZhHDEb3I=", "checksumSHA1": "34BpqXixb+aV4iuOioQeSej255Y=",
"path": "google.golang.org/api/pubsub/v1", "path": "google.golang.org/api/pubsub/v1",
"revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-08-05T04:28:55Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "dpHo8BrIZVf88kAsFoWYuSpG8i4=", "checksumSHA1": "moKPpECJZQR/mANGD26E7Pbxn4I=",
"path": "google.golang.org/api/sqladmin/v1beta4", "path": "google.golang.org/api/sqladmin/v1beta4",
"revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-08-05T04:28:55Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"checksumSHA1": "qi0hBhwhMRAYlSYFHeHCde+jzAQ=", "checksumSHA1": "xygm9BwoCg7vc0PPgAPdxNKJ38c=",
"path": "google.golang.org/api/storage/v1", "path": "google.golang.org/api/storage/v1",
"revision": "3f131f305a2ae45080e71fdb780128cc92e8745e", "revision": "3cc2e591b550923a2c5f0ab5a803feda924d5823",
"revisionTime": "2016-08-05T04:28:55Z" "revisionTime": "2016-11-27T23:54:21Z"
}, },
{ {
"path": "google.golang.org/appengine", "path": "google.golang.org/appengine",