From 68532d7825ef32abef2806a21fddb77271b23d67 Mon Sep 17 00:00:00 2001 From: Maxim Mazurok Date: Fri, 14 Aug 2020 12:21:08 +0000 Subject: [PATCH] automatic gapi.client.deploymentmanager update @ Fri, 14 Aug 2020 12:21:08 GMT --- .../gapi.client.deploymentmanager-tests.ts | 484 +++++++++-- .../gapi.client.deploymentmanager/index.d.ts | 808 ++++++++++-------- types/gapi.client.deploymentmanager/readme.md | 232 ++--- .../tsconfig.json | 10 +- .../gapi.client.deploymentmanager/tslint.json | 5 +- 5 files changed, 979 insertions(+), 560 deletions(-) diff --git a/types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts b/types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts index e15cf3611e7bff..79f39cb8f2a537 100644 --- a/types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts +++ b/types/gapi.client.deploymentmanager/gapi.client.deploymentmanager-tests.ts @@ -1,7 +1,7 @@ -/* This is stub file for gapi.client.{{=it.name}} definition tests */ +/* This is stub file for gapi.client.deploymentmanager definition tests */ /* IMPORTANT. -* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. -* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +* This file was automatically generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually. +* In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator **/ gapi.load('client', () => { /** now we can use gapi.client */ @@ -21,134 +21,448 @@ gapi.load('client', () => { /** View your Google Cloud Platform management resources and deployment status information */ 'https://www.googleapis.com/auth/ndev.cloudman.readonly', ]; - const immediate = true; + const immediate = false; gapi.auth.authorize({ client_id, scope, immediate }, authResult => { if (authResult && !authResult.error) { - /** handle succesfull authorization */ + /** handle successful authorization */ run(); } else { /** handle authorization error */ } }); - run(); }); async function run() { /** Cancels and removes the preview currently associated with the deployment. */ - await gapi.client.deployments.cancelPreview({ - deployment: "deployment", - project: "project", + await gapi.client.deploymentmanager.deployments.cancelPreview({ + deployment: "Test string", + project: "Test string", + }, { + fingerprint: "Test string", }); /** Deletes a deployment and all of the resources in the deployment. */ - await gapi.client.deployments.delete({ - deletePolicy: "deletePolicy", - deployment: "deployment", - project: "project", + await gapi.client.deploymentmanager.deployments.delete({ + deletePolicy: "Test string", + deployment: "Test string", + project: "Test string", }); /** Gets information about a specific deployment. */ - await gapi.client.deployments.get({ - deployment: "deployment", - project: "project", + await gapi.client.deploymentmanager.deployments.get({ + deployment: "Test string", + project: "Test string", }); /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ - await gapi.client.deployments.getIamPolicy({ - project: "project", - resource: "resource", + await gapi.client.deploymentmanager.deployments.getIamPolicy({ + project: "Test string", + resource: "Test string", }); /** Creates a deployment and all of the resources described by the deployment manifest. */ - await gapi.client.deployments.insert({ + await gapi.client.deploymentmanager.deployments.insert({ + createPolicy: "Test string", preview: true, - project: "project", + project: "Test string", + }, { + description: "Test string", + fingerprint: "Test string", + id: "Test string", + insertTime: "Test string", + labels: [ + { + key: "Test string", + value: "Test string", + } ], + manifest: "Test string", + name: "Test string", + operation: { + clientOperationId: "Test string", + creationTimestamp: "Test string", + description: "Test string", + endTime: "Test string", + error: { + errors: [ + { + code: "Test string", + location: "Test string", + message: "Test string", + } ], + }, + httpErrorMessage: "Test string", + httpErrorStatusCode: 42, + id: "Test string", + insertTime: "Test string", + kind: "Test string", + name: "Test string", + operationType: "Test string", + progress: 42, + region: "Test string", + selfLink: "Test string", + startTime: "Test string", + status: "Test string", + statusMessage: "Test string", + targetId: "Test string", + targetLink: "Test string", + user: "Test string", + warnings: [ + { + code: "Test string", + data: [ + { + key: "Test string", + value: "Test string", + } ], + message: "Test string", + } ], + zone: "Test string", + }, + selfLink: "Test string", + target: { + config: { + content: "Test string", + }, + imports: [ + { + content: "Test string", + name: "Test string", + } ], + }, + update: { + description: "Test string", + labels: [ + { + key: "Test string", + value: "Test string", + } ], + manifest: "Test string", + }, + updateTime: "Test string", }); /** Lists all deployments for a given project. */ - await gapi.client.deployments.list({ - filter: "filter", - maxResults: 2, - orderBy: "orderBy", - pageToken: "pageToken", - project: "project", - }); - /** Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics. */ - await gapi.client.deployments.patch({ - createPolicy: "createPolicy", - deletePolicy: "deletePolicy", - deployment: "deployment", + await gapi.client.deploymentmanager.deployments.list({ + filter: "Test string", + maxResults: 42, + orderBy: "Test string", + pageToken: "Test string", + project: "Test string", + }); + /** Patches a deployment and all of the resources described by the deployment manifest. */ + await gapi.client.deploymentmanager.deployments.patch({ + createPolicy: "Test string", + deletePolicy: "Test string", + deployment: "Test string", preview: true, - project: "project", + project: "Test string", + }, { + description: "Test string", + fingerprint: "Test string", + id: "Test string", + insertTime: "Test string", + labels: [ + { + key: "Test string", + value: "Test string", + } ], + manifest: "Test string", + name: "Test string", + operation: { + clientOperationId: "Test string", + creationTimestamp: "Test string", + description: "Test string", + endTime: "Test string", + error: { + errors: [ + { + code: "Test string", + location: "Test string", + message: "Test string", + } ], + }, + httpErrorMessage: "Test string", + httpErrorStatusCode: 42, + id: "Test string", + insertTime: "Test string", + kind: "Test string", + name: "Test string", + operationType: "Test string", + progress: 42, + region: "Test string", + selfLink: "Test string", + startTime: "Test string", + status: "Test string", + statusMessage: "Test string", + targetId: "Test string", + targetLink: "Test string", + user: "Test string", + warnings: [ + { + code: "Test string", + data: [ + { + key: "Test string", + value: "Test string", + } ], + message: "Test string", + } ], + zone: "Test string", + }, + selfLink: "Test string", + target: { + config: { + content: "Test string", + }, + imports: [ + { + content: "Test string", + name: "Test string", + } ], + }, + update: { + description: "Test string", + labels: [ + { + key: "Test string", + value: "Test string", + } ], + manifest: "Test string", + }, + updateTime: "Test string", }); /** Sets the access control policy on the specified resource. Replaces any existing policy. */ - await gapi.client.deployments.setIamPolicy({ - project: "project", - resource: "resource", + await gapi.client.deploymentmanager.deployments.setIamPolicy({ + project: "Test string", + resource: "Test string", + }, { + bindings: [ + { + condition: { + description: "Test string", + expression: "Test string", + location: "Test string", + title: "Test string", + }, + members: [ + "Test string" ], + role: "Test string", + } ], + etag: "Test string", + policy: { + auditConfigs: [ + { + auditLogConfigs: [ + { + exemptedMembers: [ + "Test string" ], + ignoreChildExemptions: true, + logType: "Test string", + } ], + exemptedMembers: [ + "Test string" ], + service: "Test string", + } ], + bindings: [ + { + condition: { + description: "Test string", + expression: "Test string", + location: "Test string", + title: "Test string", + }, + members: [ + "Test string" ], + role: "Test string", + } ], + etag: "Test string", + iamOwned: true, + rules: [ + { + action: "Test string", + conditions: [ + { + iam: "Test string", + op: "Test string", + svc: "Test string", + sys: "Test string", + values: [ + "Test string" ], + } ], + description: "Test string", + ins: [ + "Test string" ], + logConfigs: [ + { + cloudAudit: { + authorizationLoggingOptions: { + permissionType: "Test string", + }, + logName: "Test string", + }, + counter: { + customFields: [ + { + name: "Test string", + value: "Test string", + } ], + field: "Test string", + metric: "Test string", + }, + dataAccess: { + logMode: "Test string", + }, + } ], + notIns: [ + "Test string" ], + permissions: [ + "Test string" ], + } ], + version: 42, + }, }); /** Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. */ - await gapi.client.deployments.stop({ - deployment: "deployment", - project: "project", + await gapi.client.deploymentmanager.deployments.stop({ + deployment: "Test string", + project: "Test string", + }, { + fingerprint: "Test string", }); /** Returns permissions that a caller has on the specified resource. */ - await gapi.client.deployments.testIamPermissions({ - project: "project", - resource: "resource", + await gapi.client.deploymentmanager.deployments.testIamPermissions({ + project: "Test string", + resource: "Test string", + }, { + permissions: [ + "Test string" ], }); /** Updates a deployment and all of the resources described by the deployment manifest. */ - await gapi.client.deployments.update({ - createPolicy: "createPolicy", - deletePolicy: "deletePolicy", - deployment: "deployment", + await gapi.client.deploymentmanager.deployments.update({ + createPolicy: "Test string", + deletePolicy: "Test string", + deployment: "Test string", preview: true, - project: "project", + project: "Test string", + }, { + description: "Test string", + fingerprint: "Test string", + id: "Test string", + insertTime: "Test string", + labels: [ + { + key: "Test string", + value: "Test string", + } ], + manifest: "Test string", + name: "Test string", + operation: { + clientOperationId: "Test string", + creationTimestamp: "Test string", + description: "Test string", + endTime: "Test string", + error: { + errors: [ + { + code: "Test string", + location: "Test string", + message: "Test string", + } ], + }, + httpErrorMessage: "Test string", + httpErrorStatusCode: 42, + id: "Test string", + insertTime: "Test string", + kind: "Test string", + name: "Test string", + operationType: "Test string", + progress: 42, + region: "Test string", + selfLink: "Test string", + startTime: "Test string", + status: "Test string", + statusMessage: "Test string", + targetId: "Test string", + targetLink: "Test string", + user: "Test string", + warnings: [ + { + code: "Test string", + data: [ + { + key: "Test string", + value: "Test string", + } ], + message: "Test string", + } ], + zone: "Test string", + }, + selfLink: "Test string", + target: { + config: { + content: "Test string", + }, + imports: [ + { + content: "Test string", + name: "Test string", + } ], + }, + update: { + description: "Test string", + labels: [ + { + key: "Test string", + value: "Test string", + } ], + manifest: "Test string", + }, + updateTime: "Test string", }); /** Gets information about a specific manifest. */ - await gapi.client.manifests.get({ - deployment: "deployment", - manifest: "manifest", - project: "project", + await gapi.client.deploymentmanager.manifests.get({ + deployment: "Test string", + manifest: "Test string", + project: "Test string", }); /** Lists all manifests for a given deployment. */ - await gapi.client.manifests.list({ - deployment: "deployment", - filter: "filter", - maxResults: 3, - orderBy: "orderBy", - pageToken: "pageToken", - project: "project", + await gapi.client.deploymentmanager.manifests.list({ + deployment: "Test string", + filter: "Test string", + maxResults: 42, + orderBy: "Test string", + pageToken: "Test string", + project: "Test string", }); /** Gets information about a specific operation. */ - await gapi.client.operations.get({ - operation: "operation", - project: "project", + await gapi.client.deploymentmanager.operations.get({ + operation: "Test string", + project: "Test string", }); /** Lists all operations for a project. */ - await gapi.client.operations.list({ - filter: "filter", - maxResults: 2, - orderBy: "orderBy", - pageToken: "pageToken", - project: "project", + await gapi.client.deploymentmanager.operations.list({ + filter: "Test string", + maxResults: 42, + orderBy: "Test string", + pageToken: "Test string", + project: "Test string", }); /** Gets information about a single resource. */ - await gapi.client.resources.get({ - deployment: "deployment", - project: "project", - resource: "resource", + await gapi.client.deploymentmanager.resources.get({ + deployment: "Test string", + project: "Test string", + resource: "Test string", }); /** Lists all resources in a given deployment. */ - await gapi.client.resources.list({ - deployment: "deployment", - filter: "filter", - maxResults: 3, - orderBy: "orderBy", - pageToken: "pageToken", - project: "project", + await gapi.client.deploymentmanager.resources.list({ + deployment: "Test string", + filter: "Test string", + maxResults: 42, + orderBy: "Test string", + pageToken: "Test string", + project: "Test string", }); /** Lists all resource types for Deployment Manager. */ - await gapi.client.types.list({ - filter: "filter", - maxResults: 2, - orderBy: "orderBy", - pageToken: "pageToken", - project: "project", + await gapi.client.deploymentmanager.types.list({ + filter: "Test string", + maxResults: 42, + orderBy: "Test string", + pageToken: "Test string", + project: "Test string", }); } }); diff --git a/types/gapi.client.deploymentmanager/index.d.ts b/types/gapi.client.deploymentmanager/index.d.ts index 751f7d5e308086..f0e4beadf090fb 100644 --- a/types/gapi.client.deploymentmanager/index.d.ts +++ b/types/gapi.client.deploymentmanager/index.d.ts @@ -1,13 +1,17 @@ -// Type definitions for non-npm package Google Google Cloud Deployment Manager API v2 2.0 +// Type definitions for non-npm package Google Cloud Deployment Manager API v2 2.0 // Project: https://cloud.google.com/deployment-manager/ -// Definitions by: Bolisov Alexey +// Definitions by: Maxim Mazurok +// Google API Typings Generator +// Nick Amoscato +// Declan Vong // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 // IMPORTANT -// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually. -// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator +// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually. +// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator // Generated from: https://www.googleapis.com/discovery/v1/apis/deploymentmanager/v2/rest +// Revision: 20200519 /// @@ -16,30 +20,21 @@ declare namespace gapi.client { function load(name: "deploymentmanager", version: "v2"): PromiseLike; function load(name: "deploymentmanager", version: "v2", callback: () => any): void; - const deployments: deploymentmanager.DeploymentsResource; - - const manifests: deploymentmanager.ManifestsResource; - - const operations: deploymentmanager.OperationsResource; - - const resources: deploymentmanager.ResourcesResource; - - const types: deploymentmanager.TypesResource; - namespace deploymentmanager { interface AuditConfig { /** The configuration for logging of each type of permission. */ auditLogConfigs?: AuditLogConfig[]; exemptedMembers?: string[]; /** - * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a - * special value that covers all services. + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all + * services. */ service?: string; } interface AuditLogConfig { /** Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][]. */ exemptedMembers?: string[]; + ignoreChildExemptions?: boolean; /** The log type that this config enables. */ logType?: string; } @@ -49,28 +44,44 @@ declare namespace gapi.client { } interface Binding { /** - * The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, - * including their conditions, are examined independently. This field is GOOGLE_INTERNAL. + * The condition that is associated with this binding. + * + * If the condition evaluates to `true`, then this binding applies to the current request. + * + * If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the + * members in this binding. + * + * To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ condition?: Expr; /** * 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. + * * `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@example.com` . + * * - * * `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`. * + * * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, + * `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * - * * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. + * * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, + * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service + * account retains the role in the binding. * - * * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. + * * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, + * `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * * * - * * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. + * * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. */ members?: string[]; /** Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */ @@ -85,9 +96,7 @@ declare namespace gapi.client { svc?: string; /** Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. */ sys?: string; - /** DEPRECATED. Use 'values' instead. */ - value?: string; - /** The objects of the condition. This is mutually exclusive with 'value'. */ + /** The objects of the condition. */ values?: string[]; } interface ConfigFile { @@ -98,69 +107,52 @@ declare namespace gapi.client { /** An optional user-provided description of the deployment. */ description?: string; /** - * Provides a fingerprint to use in requests to modify a deployment, such as update(), stop(), and cancelPreview() requests. A fingerprint is a randomly - * generated value that must be provided with update(), stop(), and cancelPreview() requests to perform optimistic locking. This ensures optimistic - * concurrency so that only one request happens at a time. + * Provides a fingerprint to use in requests to modify a deployment, such as `update()`, `stop()`, and `cancelPreview()` requests. A fingerprint is a randomly generated value that must + * be provided with `update()`, `stop()`, and `cancelPreview()` requests to perform optimistic locking. This ensures optimistic concurrency so that only one request happens at a time. * - * The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, - * perform a get() request to a deployment. + * The fingerprint is initially generated by Deployment Manager and changes after every request to modify data. To get the latest fingerprint value, perform a `get()` request to a + * deployment. */ fingerprint?: string; - /** Output only. Unique identifier for the resource; defined by the server. */ id?: string; - /** Output only. Timestamp when the deployment was created, in RFC3339 text format . */ + /** Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** - * Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and - * must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long and must conform to - * the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)? + * Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the following + * regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. */ labels?: DeploymentLabelEntry[]; - /** Output only. URL of the manifest representing the last manifest that was successfully deployed. */ + /** Output only. URL of the manifest representing the last manifest that was successfully deployed. If no manifest has been successfully deployed, this field will be absent. */ manifest?: string; /** - * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. - * Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be - * a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 + * characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a + * dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ name?: string; /** Output only. The Operation that most recently ran, or is currently running, on this deployment. */ operation?: Operation; - /** Output only. Self link for the deployment. */ + /** Output only. Server defined URL for the resource. */ selfLink?: string; /** [Input Only] The parameters that define your deployment, including the deployment configuration and relevant templates. */ target?: TargetConfiguration; /** Output only. If Deployment Manager is currently updating or previewing an update to this deployment, the updated configuration appears here. */ update?: DeploymentUpdate; + /** Output only. Update timestamp in RFC3339 text format. */ + updateTime?: string; } interface DeploymentLabelEntry { key?: string; value?: string; } - interface DeploymentUpdate { - /** Output only. An optional user-provided description of the deployment after the current update has been applied. */ - description?: string; - /** - * Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 - * characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63 characters long - * and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)? - */ - labels?: DeploymentUpdateLabelEntry[]; - /** Output only. URL of the manifest representing the update configuration of this deployment. */ - manifest?: string; - } - interface DeploymentUpdateLabelEntry { - key?: string; - value?: string; - } interface DeploymentsCancelPreviewRequest { /** - * Specifies a fingerprint for cancelPreview() requests. A fingerprint is a randomly generated value that must be provided in cancelPreview() requests to - * perform optimistic locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to - * make a new update request while another user attempts to cancel a preview, this would prevent one of the requests). + * Specifies a fingerprint for `cancelPreview()` requests. A fingerprint is a randomly generated value that must be provided in `cancelPreview()` requests to perform optimistic + * locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update request while another user + * attempts to cancel a preview, this would prevent one of the requests). * - * The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint - * value, perform a get() request on the deployment. + * The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint value, perform a `get()` request + * on the deployment. */ fingerprint?: string; } @@ -172,29 +164,53 @@ declare namespace gapi.client { } interface DeploymentsStopRequest { /** - * Specifies a fingerprint for stop() requests. A fingerprint is a randomly generated value that must be provided in stop() requests to perform optimistic - * locking. This ensures optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update - * request while another user attempts to stop an ongoing update request, this would prevent a collision). + * Specifies a fingerprint for `stop()` requests. A fingerprint is a randomly generated value that must be provided in `stop()` requests to perform optimistic locking. This ensures + * optimistic concurrency so that the deployment does not have conflicting requests (e.g. if someone attempts to make a new update request while another user attempts to stop an + * ongoing update request, this would prevent a collision). * - * The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint - * value, perform a get() request on the deployment. + * The fingerprint is initially generated by Deployment Manager and changes after every request to modify a deployment. To get the latest fingerprint value, perform a `get()` request + * on the deployment. */ fingerprint?: string; } - interface Expr { - /** An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */ + interface DeploymentUpdate { + /** Output only. An optional user-provided description of the deployment after the current update has been applied. */ description?: string; /** - * Textual representation of an expression in Common Expression Language syntax. - * - * The application context of the containing message determines which well-known feature set of CEL is supported. + * Output only. Map of labels; provided by the client when the resource is created or updated. Specifically: Label keys must be between 1 and 63 characters long and must conform to the + * following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?` Label values must be between 0 and 63 characters long and must conform to the regular expression + * `([a-z]([-a-z0-9]*[a-z0-9])?)?`. */ + labels?: DeploymentUpdateLabelEntry[]; + /** Output only. URL of the manifest representing the update configuration of this deployment. */ + manifest?: string; + } + interface DeploymentUpdateLabelEntry { + key?: string; + value?: string; + } + interface Expr { + /** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */ + description?: string; + /** Textual representation of an expression in Common Expression Language syntax. */ expression?: string; - /** An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */ + /** Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */ location?: string; - /** An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */ + /** Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */ title?: string; } + interface GlobalSetPolicyRequest { + /** Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings. */ + bindings?: Binding[]; + /** Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag. */ + etag?: string; + /** + * 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 in general a valid policy but certain + * services (like Projects) might reject them. + */ + policy?: Policy; + } + // tslint:disable-next-line:interface-name interface ImportFile { /** The contents of the file. */ content?: string; @@ -216,13 +232,20 @@ declare namespace gapi.client { logName?: string; } interface LogConfigCounterOptions { + /** Custom fields. */ + customFields?: LogConfigCounterOptionsCustomField[]; /** The field value to attribute. */ field?: string; /** The metric to update. */ metric?: string; } + interface LogConfigCounterOptionsCustomField { + /** Name is the field name. */ + name?: string; + /** Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext. */ + value?: string; + } interface LogConfigDataAccessOptions { - /** Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now. */ logMode?: string; } interface Manifest { @@ -230,11 +253,10 @@ declare namespace gapi.client { config?: ConfigFile; /** Output only. The fully-expanded configuration file, including any templates and references. */ expandedConfig?: string; - /** Output only. Unique identifier for the resource; defined by the server. */ id?: string; /** Output only. The imported files for this manifest. */ imports?: ImportFile[]; - /** Output only. Timestamp when the manifest was created, in RFC3339 text format. */ + /** Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** Output only. The YAML layout for this manifest. */ layout?: string; @@ -254,7 +276,7 @@ declare namespace gapi.client { nextPageToken?: string; } interface Operation { - /** [Output Only] Reserved for future use. */ + /** [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. */ clientOperationId?: string; /** [Deprecated] This field is deprecated. */ creationTimestamp?: string; @@ -274,47 +296,43 @@ declare namespace gapi.client { message?: string; }>; }; - /** [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. */ + /** [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`. */ httpErrorMessage?: string; - /** - * [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not - * found. - */ + /** [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found. */ httpErrorStatusCode?: number; - /** [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ + /** [Output Only] The unique identifier for the operation. This identifier is defined by the server. */ id?: string; /** [Output Only] The time that this operation was requested. This value is in RFC3339 text format. */ insertTime?: string; - /** [Output Only] Type of the resource. Always compute#operation for Operation resources. */ + /** [Output Only] Type of the resource. Always `compute#operation` for Operation resources. */ kind?: string; - /** [Output Only] Name of the resource. */ + /** [Output Only] Name of the operation. */ name?: string; - /** [Output Only] The type of operation, such as insert, update, or delete, and so on. */ + /** [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on. */ operationType?: string; /** - * [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of - * operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation - * progresses. + * [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used + * to guess when the operation will be complete. This number should monotonically increase as the operation progresses. */ progress?: number; - /** [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. */ + /** [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. */ region?: string; /** [Output Only] Server-defined URL for the resource. */ selfLink?: string; /** [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. */ startTime?: string; - /** [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. */ + /** [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`. */ status?: string; /** [Output Only] An optional textual description of the current status of the operation. */ statusMessage?: string; /** [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. */ targetId?: string; /** - * [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk - * that the snapshot was created from. + * [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created + * from. */ targetLink?: string; - /** [Output Only] User who requested the operation, for example: user@example.com. */ + /** [Output Only] User who requested the operation, for example: `user@example.com`. */ user?: string; /** [Output Only] If warning messages are generated during processing of the operation, this field will be populated. */ warnings?: Array<{ @@ -326,10 +344,9 @@ declare namespace gapi.client { */ data?: Array<{ /** - * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for - * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and - * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled - * for IP forwarding). + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, + * this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning + * about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). */ key?: string; /** [Output Only] A warning data value corresponding to the key. */ @@ -338,7 +355,7 @@ declare namespace gapi.client { /** [Output Only] A human-readable description of the warning code. */ message?: string; }>; - /** [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. */ + /** [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. */ zone?: string; } interface OperationsListResponse { @@ -350,26 +367,44 @@ declare namespace gapi.client { interface Policy { /** Specifies cloud audit logging configuration for this policy. */ auditConfigs?: AuditConfig[]; - /** Associates a list of `members` to a `role`. `bindings` with no members will result in an error. */ + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at + * least one member. + */ bindings?: Binding[]; /** - * `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. + * `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. + * **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` + * policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. */ etag?: string; iamOwned?: boolean; /** - * If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any - * DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any - * ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no - * rule applies, permission is denied. + * If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission + * is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be + * applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied. */ rules?: Rule[]; - /** Version of the `Policy`. The default version is 0. */ + /** + * Specifies the format of the policy. + * + * Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. + * + * Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: + * + * * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role + * binding, with or without a condition, from a policy that includes conditions + * + * **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` + * policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + * + * If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. + * + * To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ version?: number; } interface Resource { @@ -377,9 +412,8 @@ declare namespace gapi.client { accessControl?: ResourceAccessControl; /** Output only. The evaluated properties of the resource with references expanded. Returned as serialized YAML. */ finalProperties?: string; - /** Output only. Unique identifier for the resource; defined by the server. */ id?: string; - /** Output only. Timestamp when the resource was created or acquired, in RFC3339 text format . */ + /** Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** Output only. URL of the manifest representing the current configuration of this resource. */ manifest?: string; @@ -387,11 +421,11 @@ declare namespace gapi.client { name?: string; /** Output only. The current properties of the resource before any references have been filled in. Returned as serialized YAML. */ properties?: string; - /** Output only. The type of the resource, for example compute.v1.instance, or cloudfunctions.v1beta1.function. */ + /** Output only. The type of the resource, for example `compute.v1.instance`, or `cloudfunctions.v1beta1.function`. */ type?: string; /** Output only. If Deployment Manager is currently updating or previewing an update to this resource, the updated configuration appears here. */ update?: ResourceUpdate; - /** Output only. Timestamp when the resource was updated, in RFC3339 text format . */ + /** Output only. Update timestamp in RFC3339 text format. */ updateTime?: string; /** Output only. The URL of the actual resource. */ url?: string; @@ -405,10 +439,9 @@ declare namespace gapi.client { */ data?: Array<{ /** - * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for - * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and - * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled - * for IP forwarding). + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, + * this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning + * about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). */ key?: string; /** [Output Only] A warning data value corresponding to the key. */ @@ -422,6 +455,12 @@ declare namespace gapi.client { /** The GCP IAM Policy to set on the resource. */ gcpIamPolicy?: string; } + interface ResourcesListResponse { + /** A token used to continue a truncated list request. */ + nextPageToken?: string; + /** Resources contained in this list response. */ + resources?: Resource[]; + } interface ResourceUpdate { /** The Access Control Policy to set on this resource after updating the resource itself. */ accessControl?: ResourceAccessControl; @@ -439,7 +478,7 @@ declare namespace gapi.client { }; /** Output only. The expanded properties of the resource with reference values expanded. Returned as serialized YAML. */ finalProperties?: string; - /** Output only. The intent of the resource: PREVIEW, UPDATE, or CANCEL. */ + /** Output only. The intent of the resource: `PREVIEW`, `UPDATE`, or `CANCEL`. */ intent?: string; /** Output only. URL of the manifest representing the update configuration of this resource. */ manifest?: string; @@ -457,10 +496,9 @@ declare namespace gapi.client { */ data?: Array<{ /** - * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for - * a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and - * a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled - * for IP forwarding). + * [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, + * this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning + * about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). */ key?: string; /** [Output Only] A warning data value corresponding to the key. */ @@ -470,12 +508,6 @@ declare namespace gapi.client { message?: string; }>; } - interface ResourcesListResponse { - /** A token used to continue a truncated list request. */ - nextPageToken?: string; - /** Resources contained in this list response. */ - resources?: Resource[]; - } interface Rule { /** Required */ action?: string; @@ -489,23 +521,20 @@ declare namespace gapi.client { logConfigs?: LogConfig[]; /** If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. */ notIns?: string[]; - /** - * 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. - */ + /** A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. */ permissions?: string[]; } interface TargetConfiguration { /** The configuration to use for this deployment. */ config?: ConfigFile; /** - * Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in - * order to use the file in a template. + * Specifies any files to import for this configuration. This can be used to import templates or other files. For example, you might import a text file in order to use the file in a + * template. */ imports?: ImportFile[]; } interface TestPermissionsRequest { - /** The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. */ + /** The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. */ permissions?: string[]; } interface TestPermissionsResponse { @@ -513,15 +542,14 @@ declare namespace gapi.client { permissions?: string[]; } interface Type { - /** Output only. Unique identifier for the resource; defined by the server. */ id?: string; - /** Output only. Timestamp when the type was created, in RFC3339 text format. */ + /** Output only. Creation timestamp in RFC3339 text format. */ insertTime?: string; /** Name of the type. */ name?: string; /** Output only. The Operation that most recently ran, or is currently running, on this type. */ operation?: Operation; - /** Output only. Self link for the type. */ + /** Output only. Server defined URL for the resource. */ selfLink?: string; } interface TypesListResponse { @@ -547,16 +575,36 @@ declare namespace gapi.client { prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; + /** Request body */ + resource: DeploymentsCancelPreviewRequest; }): Request; + cancelPreview(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ + quotaUser?: string; + /** Deprecated. Please use quotaUser instead. */ + userIp?: string; + }, + body: DeploymentsCancelPreviewRequest): Request; /** Deletes a deployment and all of the resources in the deployment. */ - delete(request: { + delete(request?: { /** Data format for the response. */ alt?: string; /** Sets the policy to use for deleting resources. */ @@ -573,16 +621,13 @@ declare namespace gapi.client { prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; /** Gets information about a specific deployment. */ - get(request: { + get(request?: { /** Data format for the response. */ alt?: string; /** The name of the deployment for this request. */ @@ -597,16 +642,13 @@ declare namespace gapi.client { prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; /** Gets the access control policy for a resource. May be empty if no such policy or resource exists. */ - getIamPolicy(request: { + getIamPolicy(request?: { /** Data format for the response. */ alt?: string; /** Selector specifying which fields to include in a partial response. */ @@ -619,20 +661,19 @@ declare namespace gapi.client { prettyPrint?: boolean; /** Project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** Name of the resource for this request. */ + /** Name or id of the resource for this request. */ resource: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; /** Creates a deployment and all of the resources described by the deployment manifest. */ insert(request: { /** Data format for the response. */ alt?: string; + /** Sets the policy to use for creating new resources. */ + createPolicy?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ @@ -642,50 +683,72 @@ declare namespace gapi.client { /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** - * If set to true, creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what - * your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use - * the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must - * separately delete this deployment if you want to remove it. + * If set to true, creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. + * After previewing a deployment, you can deploy your resources by making a request with the `update()` method or you can use the `cancelPreview()` method to cancel the preview + * altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it. */ preview?: boolean; /** The project ID for this request. */ project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ + quotaUser?: string; + /** Deprecated. Please use quotaUser instead. */ + userIp?: string; + /** Request body */ + resource: Deployment; + }): Request; + insert(request: { + /** Data format for the response. */ + alt?: string; + /** Sets the policy to use for creating new resources. */ + createPolicy?: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. + * If set to true, creates a deployment and creates "shell" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. + * After previewing a deployment, you can deploy your resources by making a request with the `update()` method or you can use the `cancelPreview()` method to cancel the preview + * altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it. */ + preview?: boolean; + /** The project ID for this request. */ + project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; - }): Request; + }, + body: Deployment): Request; /** Lists all deployments for a given project. */ - list(request: { + list(request?: { /** Data format for the response. */ alt?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** - * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. * - * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string - * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of - * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The - * literal value must match the entire field. + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic + * restarts. You can use filtering on nested fields to filter based on resource labels. * - * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering - * on nested fields to take advantage of labels to organize and search for results based on label values. - * - * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq - * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + * To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` + * By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR + * (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` */ filter?: string; /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** - * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a - * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can + * be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ maxResults?: number; /** OAuth 2.0 token for the current user. */ @@ -693,28 +756,24 @@ declare namespace gapi.client { /** * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the - * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation - * is returned first. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field + * in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * Currently, only sorting by name or creationTimestamp desc is supported. + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ orderBy?: string; - /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ pageToken?: string; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; - /** Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics. */ + /** Patches a deployment and all of the resources described by the deployment manifest. */ patch(request: { /** Data format for the response. */ alt?: string; @@ -733,23 +792,53 @@ declare namespace gapi.client { /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** - * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This - * allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must - * provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request - * with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview - * and you must separately delete this deployment if you want to remove it. + * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what + * your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a `target.config` with a configuration if this is + * set to true. After previewing a deployment, you can deploy your resources by making a request with the `update()` or you can `cancelPreview()` to remove the preview altogether. + * Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it. */ preview?: boolean; /** The project ID for this request. */ project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ + quotaUser?: string; + /** Deprecated. Please use quotaUser instead. */ + userIp?: string; + /** Request body */ + resource: Deployment; + }): Request; + patch(request: { + /** Data format for the response. */ + alt?: string; + /** Sets the policy to use for creating new resources. */ + createPolicy?: string; + /** Sets the policy to use for deleting resources. */ + deletePolicy?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. + * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what + * your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a `target.config` with a configuration if this is + * set to true. After previewing a deployment, you can deploy your resources by making a request with the `update()` or you can `cancelPreview()` to remove the preview altogether. + * Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it. */ + preview?: boolean; + /** The project ID for this request. */ + project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; - }): Request; + }, + body: Deployment): Request; /** Sets the access control policy on the specified resource. Replaces any existing policy. */ setIamPolicy(request: { /** Data format for the response. */ @@ -764,16 +853,14 @@ declare namespace gapi.client { prettyPrint?: boolean; /** Project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** Name of the resource for this request. */ + /** Name or id of the resource for this request. */ resource: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; - }): Request; + }, + body: GlobalSetPolicyRequest): Request; /** Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. */ stop(request: { /** Data format for the response. */ @@ -790,14 +877,34 @@ declare namespace gapi.client { prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; + /** Request body */ + resource: DeploymentsStopRequest; }): Request; + stop(request: { + /** Data format for the response. */ + alt?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; + /** The project ID for this request. */ + project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ + quotaUser?: string; + /** Deprecated. Please use quotaUser instead. */ + userIp?: string; + }, + body: DeploymentsStopRequest): Request; /** Returns permissions that a caller has on the specified resource. */ testIamPermissions(request: { /** Data format for the response. */ @@ -812,16 +919,14 @@ declare namespace gapi.client { prettyPrint?: boolean; /** Project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** Name of the resource for this request. */ + /** Name or id of the resource for this request. */ resource: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; - }): Request; + }, + body: TestPermissionsRequest): Request; /** Updates a deployment and all of the resources described by the deployment manifest. */ update(request: { /** Data format for the response. */ @@ -841,27 +946,57 @@ declare namespace gapi.client { /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** - * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This - * allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must - * provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request - * with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview - * and you must separately delete this deployment if you want to remove it. + * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what + * your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a `target.config` with a configuration if this is + * set to true. After previewing a deployment, you can deploy your resources by making a request with the `update()` or you can `cancelPreview()` to remove the preview altogether. + * Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it. */ preview?: boolean; /** The project ID for this request. */ project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ + quotaUser?: string; + /** Deprecated. Please use quotaUser instead. */ + userIp?: string; + /** Request body */ + resource: Deployment; + }): Request; + update(request: { + /** Data format for the response. */ + alt?: string; + /** Sets the policy to use for creating new resources. */ + createPolicy?: string; + /** Sets the policy to use for deleting resources. */ + deletePolicy?: string; + /** The name of the deployment for this request. */ + deployment: string; + /** Selector specifying which fields to include in a partial response. */ + fields?: string; + /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ + key?: string; + /** OAuth 2.0 token for the current user. */ + oauth_token?: string; + /** Returns response with indentations and line breaks. */ + prettyPrint?: boolean; /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. + * If set to true, updates the deployment and creates and updates the "shell" resources but does not actually alter or instantiate these resources. This allows you to preview what + * your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a `target.config` with a configuration if this is + * set to true. After previewing a deployment, you can deploy your resources by making a request with the `update()` or you can `cancelPreview()` to remove the preview altogether. + * Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it. */ + preview?: boolean; + /** The project ID for this request. */ + project: string; + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; - }): Request; + }, + body: Deployment): Request; } interface ManifestsResource { /** Gets information about a specific manifest. */ - get(request: { + get(request?: { /** Data format for the response. */ alt?: string; /** The name of the deployment for this request. */ @@ -878,16 +1013,13 @@ declare namespace gapi.client { prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; /** Lists all manifests for a given deployment. */ - list(request: { + list(request?: { /** Data format for the response. */ alt?: string; /** The name of the deployment for this request. */ @@ -895,27 +1027,24 @@ declare namespace gapi.client { /** Selector specifying which fields to include in a partial response. */ fields?: string; /** - * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. - * - * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string - * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of - * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The - * literal value must match the entire field. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. * - * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering - * on nested fields to take advantage of labels to organize and search for results based on label values. + * You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic + * restarts. You can use filtering on nested fields to filter based on resource labels. * - * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq - * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + * To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` + * By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR + * (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` */ filter?: string; /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** - * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a - * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can + * be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ maxResults?: number; /** OAuth 2.0 token for the current user. */ @@ -923,31 +1052,27 @@ declare namespace gapi.client { /** * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the - * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation - * is returned first. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field + * in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * Currently, only sorting by name or creationTimestamp desc is supported. + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ orderBy?: string; - /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ pageToken?: string; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; } interface OperationsResource { /** Gets information about a specific operation. */ - get(request: { + get(request?: { /** Data format for the response. */ alt?: string; /** Selector specifying which fields to include in a partial response. */ @@ -962,42 +1087,36 @@ declare namespace gapi.client { prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; /** Lists all operations for a project. */ - list(request: { + list(request?: { /** Data format for the response. */ alt?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** - * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. * - * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string - * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of - * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The - * literal value must match the entire field. + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic + * restarts. You can use filtering on nested fields to filter based on resource labels. * - * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering - * on nested fields to take advantage of labels to organize and search for results based on label values. - * - * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq - * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + * To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` + * By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR + * (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` */ filter?: string; /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** - * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a - * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can + * be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ maxResults?: number; /** OAuth 2.0 token for the current user. */ @@ -1005,31 +1124,27 @@ declare namespace gapi.client { /** * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the - * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation - * is returned first. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field + * in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * Currently, only sorting by name or creationTimestamp desc is supported. + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ orderBy?: string; - /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ pageToken?: string; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; } interface ResourcesResource { /** Gets information about a single resource. */ - get(request: { + get(request?: { /** Data format for the response. */ alt?: string; /** The name of the deployment for this request. */ @@ -1044,18 +1159,15 @@ declare namespace gapi.client { prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; /** The name of the resource for this request. */ resource: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; /** Lists all resources in a given deployment. */ - list(request: { + list(request?: { /** Data format for the response. */ alt?: string; /** The name of the deployment for this request. */ @@ -1063,27 +1175,24 @@ declare namespace gapi.client { /** Selector specifying which fields to include in a partial response. */ fields?: string; /** - * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. * - * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string - * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of - * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The - * literal value must match the entire field. + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic + * restarts. You can use filtering on nested fields to filter based on resource labels. * - * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering - * on nested fields to take advantage of labels to organize and search for results based on label values. - * - * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq - * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + * To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` + * By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR + * (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` */ filter?: string; /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** - * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a - * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can + * be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ maxResults?: number; /** OAuth 2.0 token for the current user. */ @@ -1091,57 +1200,50 @@ declare namespace gapi.client { /** * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the - * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation - * is returned first. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field + * in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * Currently, only sorting by name or creationTimestamp desc is supported. + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ orderBy?: string; - /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ pageToken?: string; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; } interface TypesResource { /** Lists all resource types for Deployment Manager. */ - list(request: { + list(request?: { /** Data format for the response. */ alt?: string; /** Selector specifying which fields to include in a partial response. */ fields?: string; /** - * Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string. - * - * The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string - * must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of - * field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The - * literal value must match the entire field. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. * - * For example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance. + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering - * on nested fields to take advantage of labels to organize and search for results based on label values. + * You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic + * restarts. You can use filtering on nested fields to filter based on resource labels. * - * To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq - * us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. + * To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` + * By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR + * (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` */ filter?: string; /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** - * The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a - * nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can + * be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ maxResults?: number; /** OAuth 2.0 token for the current user. */ @@ -1149,27 +1251,33 @@ declare namespace gapi.client { /** * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the - * creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation - * is returned first. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field + * in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * Currently, only sorting by name or creationTimestamp desc is supported. + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ orderBy?: string; - /** Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. */ + /** Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ pageToken?: string; /** Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** The project ID for this request. */ project: string; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - * Overrides userIp if both are provided. - */ + /** An opaque string that represents a user for quota purposes. Must not exceed 40 characters. */ quotaUser?: string; - /** IP address of the site where the request originates. Use this if you want to enforce per-user limits. */ + /** Deprecated. Please use quotaUser instead. */ userIp?: string; }): Request; } + + const deployments: DeploymentsResource; + + const manifests: ManifestsResource; + + const operations: OperationsResource; + + const resources: ResourcesResource; + + const types: TypesResource; } } diff --git a/types/gapi.client.deploymentmanager/readme.md b/types/gapi.client.deploymentmanager/readme.md index b14c3e91e719a1..5167c182ef1396 100644 --- a/types/gapi.client.deploymentmanager/readme.md +++ b/types/gapi.client.deploymentmanager/readme.md @@ -1,10 +1,12 @@ # TypeScript typings for Google Cloud Deployment Manager API v2 + Declares, configures, and deploys complex solutions on Google Cloud Platform. For detailed description please check [documentation](https://cloud.google.com/deployment-manager/). ## Installing Install typings for Google Cloud Deployment Manager API: + ``` npm install @types/gapi.client.deploymentmanager@v2 --save-dev ``` @@ -12,142 +14,146 @@ npm install @types/gapi.client.deploymentmanager@v2 --save-dev ## Usage You need to initialize Google API client in your code: + ```typescript -gapi.load("client", () => { - // now we can use gapi.client - // ... +gapi.load('client', () => { + // now we can use gapi.client + // ... }); ``` Then load api client wrapper: + ```typescript gapi.client.load('deploymentmanager', 'v2', () => { - // now we can use gapi.client.deploymentmanager - // ... + // now we can use gapi.client.deploymentmanager + // ... }); ``` Don't forget to authenticate your client before sending any request to resources: -```typescript +```typescript // declare client_id registered in Google Developers Console var client_id = '', - scope = [ - // View and manage your data across Google Cloud Platform services - 'https://www.googleapis.com/auth/cloud-platform', - - // View your data across Google Cloud Platform services - 'https://www.googleapis.com/auth/cloud-platform.read-only', - - // View and manage your Google Cloud Platform management resources and deployment status information - 'https://www.googleapis.com/auth/ndev.cloudman', - - // View your Google Cloud Platform management resources and deployment status information - 'https://www.googleapis.com/auth/ndev.cloudman.readonly', + scope = [ + // View and manage your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform', + + // View your data across Google Cloud Platform services + 'https://www.googleapis.com/auth/cloud-platform.read-only', + + // View and manage your Google Cloud Platform management resources and deployment status information + 'https://www.googleapis.com/auth/ndev.cloudman', + + // View your Google Cloud Platform management resources and deployment status information + 'https://www.googleapis.com/auth/ndev.cloudman.readonly', ], immediate = true; // ... -gapi.auth.authorize({ client_id: client_id, scope: scope, immediate: immediate }, authResult => { +gapi.auth.authorize( + { client_id: client_id, scope: scope, immediate: immediate }, + authResult => { if (authResult && !authResult.error) { - /* handle succesfull authorization */ + /* handle successful authorization */ } else { /* handle authorization error */ } -}); +}); ``` After that you can use Google Cloud Deployment Manager API resources: -```typescript - -/* -Cancels and removes the preview currently associated with the deployment. -*/ -await gapi.client.deployments.cancelPreview({ deployment: "deployment", project: "project", }); - -/* -Deletes a deployment and all of the resources in the deployment. -*/ -await gapi.client.deployments.delete({ deployment: "deployment", project: "project", }); - -/* -Gets information about a specific deployment. -*/ -await gapi.client.deployments.get({ deployment: "deployment", project: "project", }); - -/* -Gets the access control policy for a resource. May be empty if no such policy or resource exists. -*/ -await gapi.client.deployments.getIamPolicy({ project: "project", resource: "resource", }); - -/* -Creates a deployment and all of the resources described by the deployment manifest. -*/ -await gapi.client.deployments.insert({ project: "project", }); - -/* -Lists all deployments for a given project. -*/ -await gapi.client.deployments.list({ project: "project", }); - -/* -Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics. -*/ -await gapi.client.deployments.patch({ deployment: "deployment", project: "project", }); - -/* -Sets the access control policy on the specified resource. Replaces any existing policy. -*/ -await gapi.client.deployments.setIamPolicy({ project: "project", resource: "resource", }); - -/* -Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. -*/ -await gapi.client.deployments.stop({ deployment: "deployment", project: "project", }); - -/* -Returns permissions that a caller has on the specified resource. -*/ -await gapi.client.deployments.testIamPermissions({ project: "project", resource: "resource", }); - -/* -Updates a deployment and all of the resources described by the deployment manifest. -*/ -await gapi.client.deployments.update({ deployment: "deployment", project: "project", }); - -/* -Gets information about a specific manifest. -*/ -await gapi.client.manifests.get({ deployment: "deployment", manifest: "manifest", project: "project", }); - -/* -Lists all manifests for a given deployment. -*/ -await gapi.client.manifests.list({ deployment: "deployment", project: "project", }); - -/* -Gets information about a specific operation. -*/ -await gapi.client.operations.get({ operation: "operation", project: "project", }); - -/* -Lists all operations for a project. -*/ -await gapi.client.operations.list({ project: "project", }); - -/* -Gets information about a single resource. -*/ -await gapi.client.resources.get({ deployment: "deployment", project: "project", resource: "resource", }); - -/* -Lists all resources in a given deployment. -*/ -await gapi.client.resources.list({ deployment: "deployment", project: "project", }); - -/* -Lists all resource types for Deployment Manager. -*/ -await gapi.client.types.list({ project: "project", }); -``` \ No newline at end of file +```typescript + +/* +Cancels and removes the preview currently associated with the deployment. +*/ +await gapi.client.deploymentmanager.deployments.cancelPreview({ deployment: "deployment", project: "project", }); + +/* +Deletes a deployment and all of the resources in the deployment. +*/ +await gapi.client.deploymentmanager.deployments.delete({ deployment: "deployment", project: "project", }); + +/* +Gets information about a specific deployment. +*/ +await gapi.client.deploymentmanager.deployments.get({ deployment: "deployment", project: "project", }); + +/* +Gets the access control policy for a resource. May be empty if no such policy or resource exists. +*/ +await gapi.client.deploymentmanager.deployments.getIamPolicy({ project: "project", resource: "resource", }); + +/* +Creates a deployment and all of the resources described by the deployment manifest. +*/ +await gapi.client.deploymentmanager.deployments.insert({ project: "project", }); + +/* +Lists all deployments for a given project. +*/ +await gapi.client.deploymentmanager.deployments.list({ project: "project", }); + +/* +Patches a deployment and all of the resources described by the deployment manifest. +*/ +await gapi.client.deploymentmanager.deployments.patch({ deployment: "deployment", project: "project", }); + +/* +Sets the access control policy on the specified resource. Replaces any existing policy. +*/ +await gapi.client.deploymentmanager.deployments.setIamPolicy({ project: "project", resource: "resource", }); + +/* +Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started. +*/ +await gapi.client.deploymentmanager.deployments.stop({ deployment: "deployment", project: "project", }); + +/* +Returns permissions that a caller has on the specified resource. +*/ +await gapi.client.deploymentmanager.deployments.testIamPermissions({ project: "project", resource: "resource", }); + +/* +Updates a deployment and all of the resources described by the deployment manifest. +*/ +await gapi.client.deploymentmanager.deployments.update({ deployment: "deployment", project: "project", }); + +/* +Gets information about a specific manifest. +*/ +await gapi.client.deploymentmanager.manifests.get({ deployment: "deployment", manifest: "manifest", project: "project", }); + +/* +Lists all manifests for a given deployment. +*/ +await gapi.client.deploymentmanager.manifests.list({ deployment: "deployment", project: "project", }); + +/* +Gets information about a specific operation. +*/ +await gapi.client.deploymentmanager.operations.get({ operation: "operation", project: "project", }); + +/* +Lists all operations for a project. +*/ +await gapi.client.deploymentmanager.operations.list({ project: "project", }); + +/* +Gets information about a single resource. +*/ +await gapi.client.deploymentmanager.resources.get({ deployment: "deployment", project: "project", resource: "resource", }); + +/* +Lists all resources in a given deployment. +*/ +await gapi.client.deploymentmanager.resources.list({ deployment: "deployment", project: "project", }); + +/* +Lists all resource types for Deployment Manager. +*/ +await gapi.client.deploymentmanager.types.list({ project: "project", }); +``` diff --git a/types/gapi.client.deploymentmanager/tsconfig.json b/types/gapi.client.deploymentmanager/tsconfig.json index 076720d734e99c..9ece7ee2932652 100644 --- a/types/gapi.client.deploymentmanager/tsconfig.json +++ b/types/gapi.client.deploymentmanager/tsconfig.json @@ -1,10 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6", - "dom" - ], + "lib": ["es6", "dom"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -17,8 +14,5 @@ "forceConsistentCasingInFileNames": true, "strictFunctionTypes": true }, - "files": [ - "index.d.ts", - "gapi.client.deploymentmanager-tests.ts" - ] + "files": ["index.d.ts", "gapi.client.deploymentmanager-tests.ts"] } diff --git a/types/gapi.client.deploymentmanager/tslint.json b/types/gapi.client.deploymentmanager/tslint.json index 485f63dae00257..f93cf8562ad24d 100644 --- a/types/gapi.client.deploymentmanager/tslint.json +++ b/types/gapi.client.deploymentmanager/tslint.json @@ -1,6 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "await-promise": false - } + "extends": "dtslint/dt.json" }