From fbb1152c2d1af4cc6d1d226b1ee7be3ed805f760 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Wed, 10 Oct 2018 17:35:38 -0700 Subject: [PATCH] feat: run the generator (#1384) --- src/apis/accesscontextmanager/README.md | 27 + src/apis/accesscontextmanager/index.ts | 33 + src/apis/accesscontextmanager/package.json | 24 + src/apis/accesscontextmanager/v1beta.ts | 1939 +++++++ src/apis/adexchangebuyer2/v2beta1.ts | 132 +- src/apis/admin/directory_v1.ts | 16 + src/apis/alertcenter/README.md | 27 + src/apis/alertcenter/index.ts | 31 + src/apis/alertcenter/package.json | 24 + src/apis/alertcenter/v1beta1.ts | 1036 ++++ src/apis/androiddeviceprovisioning/v1.ts | 36 + src/apis/androidenterprise/v1.ts | 10 +- src/apis/androidpublisher/README.md | 2 +- src/apis/androidpublisher/v1.1.ts | 2 +- src/apis/androidpublisher/v1.ts | 2 +- src/apis/androidpublisher/v2.ts | 9 +- src/apis/androidpublisher/v3.ts | 9 +- src/apis/appengine/v1.ts | 7 +- src/apis/appengine/v1beta.ts | 2 +- src/apis/bigquerydatatransfer/v1.ts | 31 +- src/apis/calendar/v3.ts | 83 +- src/apis/cloudasset/README.md | 27 + src/apis/cloudasset/index.ts | 30 + src/apis/cloudasset/package.json | 24 + src/apis/cloudasset/v1beta1.ts | 1117 ++++ src/apis/cloudbuild/v1.ts | 43 +- src/apis/cloudiot/v1.ts | 256 + src/apis/composer/v1.ts | 4 +- src/apis/composer/v1beta1.ts | 38 +- src/apis/compute/alpha.ts | 318 +- src/apis/compute/beta.ts | 44 +- src/apis/compute/v1.ts | 66 +- src/apis/content/v2.ts | 141 +- src/apis/content/v2sandbox.ts | 132 +- src/apis/dataflow/v1b3.ts | 5 + src/apis/dataproc/v1.ts | 8 + src/apis/dataproc/v1beta2.ts | 22 +- src/apis/datastore/v1.ts | 4 +- src/apis/datastore/v1beta3.ts | 4 +- src/apis/dialogflow/v2beta1.ts | 5310 ++++++++++++++++-- src/apis/digitalassetlinks/README.md | 2 +- src/apis/dlp/v2.ts | 105 +- src/apis/file/v1beta1.ts | 138 - src/apis/firebasedynamiclinks/v1.ts | 23 +- src/apis/firebasehosting/README.md | 27 + src/apis/firebasehosting/index.ts | 31 + src/apis/firebasehosting/package.json | 24 + src/apis/firebasehosting/v1beta1.ts | 1623 ++++++ src/apis/firebaserules/v1.ts | 10 +- src/apis/firestore/v1beta2.ts | 532 +- src/apis/games/v1.ts | 6 + src/apis/iam/v1.ts | 7 +- src/apis/iamcredentials/v1.ts | 26 +- src/apis/index.ts | 20 + src/apis/jobs/v2.ts | 25 +- src/apis/jobs/v3.ts | 52 +- src/apis/jobs/v3p1beta1.ts | 71 +- src/apis/logging/v2.ts | 9 + src/apis/logging/v2beta1.ts | 9 + src/apis/ml/v1.ts | 2 +- src/apis/monitoring/v3.ts | 29 +- src/apis/partners/v2.ts | 18 +- src/apis/proximitybeacon/v1beta1.ts | 18 +- src/apis/redis/v1.ts | 2 +- src/apis/serviceconsumermanagement/README.md | 2 +- src/apis/serviceconsumermanagement/v1.ts | 5 +- src/apis/servicecontrol/README.md | 2 +- src/apis/servicemanagement/v1.ts | 2 +- src/apis/servicenetworking/README.md | 27 + src/apis/servicenetworking/index.ts | 32 + src/apis/servicenetworking/package.json | 24 + src/apis/servicenetworking/v1beta.ts | 2424 ++++++++ src/apis/serviceusage/v1.ts | 2 +- src/apis/serviceusage/v1beta1.ts | 2 +- src/apis/serviceuser/v1.ts | 2 +- src/apis/spanner/v1.ts | 115 +- src/apis/streetviewpublish/v1.ts | 9 +- src/apis/testing/v1.ts | 27 + src/apis/videointelligence/v1.ts | 364 ++ src/apis/videointelligence/v1beta2.ts | 364 ++ src/apis/videointelligence/v1p1beta1.ts | 386 ++ src/apis/vision/v1.ts | 4 +- src/apis/vision/v1p1beta1.ts | 4 +- src/apis/vision/v1p2beta1.ts | 4 +- src/index.ts | 5 + 85 files changed, 16291 insertions(+), 1399 deletions(-) create mode 100644 src/apis/accesscontextmanager/README.md create mode 100644 src/apis/accesscontextmanager/index.ts create mode 100644 src/apis/accesscontextmanager/package.json create mode 100644 src/apis/accesscontextmanager/v1beta.ts create mode 100644 src/apis/alertcenter/README.md create mode 100644 src/apis/alertcenter/index.ts create mode 100644 src/apis/alertcenter/package.json create mode 100644 src/apis/alertcenter/v1beta1.ts create mode 100644 src/apis/cloudasset/README.md create mode 100644 src/apis/cloudasset/index.ts create mode 100644 src/apis/cloudasset/package.json create mode 100644 src/apis/cloudasset/v1beta1.ts create mode 100644 src/apis/firebasehosting/README.md create mode 100644 src/apis/firebasehosting/index.ts create mode 100644 src/apis/firebasehosting/package.json create mode 100644 src/apis/firebasehosting/v1beta1.ts create mode 100644 src/apis/servicenetworking/README.md create mode 100644 src/apis/servicenetworking/index.ts create mode 100644 src/apis/servicenetworking/package.json create mode 100644 src/apis/servicenetworking/v1beta.ts diff --git a/src/apis/accesscontextmanager/README.md b/src/apis/accesscontextmanager/README.md new file mode 100644 index 00000000000..b4433c5a403 --- /dev/null +++ b/src/apis/accesscontextmanager/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/accesscontextmanager + +> An API for setting attribute based access control to requests to GCP services. + +## Installation + +```sh +$ npm install @google/accesscontextmanager +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/accesscontextmanager/index.ts b/src/apis/accesscontextmanager/index.ts new file mode 100644 index 00000000000..e92d3b3fdd1 --- /dev/null +++ b/src/apis/accesscontextmanager/index.ts @@ -0,0 +1,33 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {accesscontextmanager_v1beta} from './v1beta'; + +export const VERSIONS = { + 'v1beta': accesscontextmanager_v1beta.Accesscontextmanager, +}; + +export function accesscontextmanager(version: 'v1beta'): + accesscontextmanager_v1beta.Accesscontextmanager; +export function accesscontextmanager( + options: accesscontextmanager_v1beta.Options): + accesscontextmanager_v1beta.Accesscontextmanager; +export function +accesscontextmanager( + this: GoogleConfigurable, + versionOrOptions: 'v1beta'|accesscontextmanager_v1beta.Options) { + return getAPI('accesscontextmanager', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/accesscontextmanager/package.json b/src/apis/accesscontextmanager/package.json new file mode 100644 index 00000000000..46e2a1f0937 --- /dev/null +++ b/src/apis/accesscontextmanager/package.json @@ -0,0 +1,24 @@ +{ + "name": "@google/accesscontextmanager", + "version": "0.1.0", + "description": "accesscontextmanager", + "main": "index.js", + "types": "index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "dependencies": { + "googleapis-common": "^0.2.0" + } +} diff --git a/src/apis/accesscontextmanager/v1beta.ts b/src/apis/accesscontextmanager/v1beta.ts new file mode 100644 index 00000000000..2a6aea2820e --- /dev/null +++ b/src/apis/accesscontextmanager/v1beta.ts @@ -0,0 +1,1939 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace accesscontextmanager_v1beta { + export interface Options extends GlobalOptions { + version: 'v1beta'; + } + + /** + * Access Context Manager API + * + * An API for setting attribute based access control to requests to GCP + * services. + * + * @example + * const {google} = require('googleapis'); + * const accesscontextmanager = google.accesscontextmanager('v1beta'); + * + * @namespace accesscontextmanager + * @type {Function} + * @version v1beta + * @variation v1beta + * @param {object=} options Options for Accesscontextmanager + */ + export class Accesscontextmanager { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + accessPolicies: Resource$Accesspolicies; + operations: Resource$Operations; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.accessPolicies = new Resource$Accesspolicies(this); + this.operations = new Resource$Operations(this); + } + + getRoot() { + return this.root; + } + } + + /** + * An `AccessLevel` is a label that can be applied to requests to GCP + * services, along with a list of requirements necessary for the label to be + * applied. `AccessLevels` can be referenced in `AccessZones` and in the + * `Cloud Org Policy` API. + */ + export interface Schema$AccessLevel { + /** + * A `BasicLevel` composed of `Conditions`. + */ + basic?: Schema$BasicLevel; + /** + * Output only. Time the `AccessLevel` was created in UTC. + */ + createTime?: string; + /** + * Description of the `AccessLevel` and its use. Does not affect behavior. + */ + description?: string; + /** + * Required. Resource name for the Access Level. The `short_name` component + * must begin with a letter and only include alphanumeric and '_'. + * Format: `accessPolicies/{policy_id}/accessLevels/{short_name}` + */ + name?: string; + /** + * Human readable title. Must be unique within the Policy. + */ + title?: string; + /** + * Output only. Time the `AccessLevel` was updated in UTC. + */ + updateTime?: string; + } + /** + * `AccessPolicy` is a container for `AccessLevels` (which define the + * necessary attributes to use GCP services) and `ServicePerimeters` (which + * define regions of services able to freely pass data within a perimeter). An + * access policy is globally visible within an organization, and the + * restrictions it specifies apply to all projects within an organization. + */ + export interface Schema$AccessPolicy { + /** + * Output only. Time the `AccessPolicy` was created in UTC. + */ + createTime?: string; + /** + * Output only. Resource name of the `AccessPolicy`. Format: + * `accessPolicies/{policy_id}` + */ + name?: string; + /** + * Required. The parent of this `AccessPolicy` in the Cloud Resource + * Hierarchy. Currently immutable once created. Format: + * `organizations/{organization_id}` + */ + parent?: string; + /** + * Human readable title. Does not affect behavior. + */ + title?: string; + /** + * Output only. Time the `AccessPolicy` was updated in UTC. + */ + updateTime?: string; + } + /** + * `BasicLevel` is an `AccessLevel` using a set of recommended features. + */ + export interface Schema$BasicLevel { + /** + * How the `conditions` list should be combined to determine if a request is + * granted this `AccessLevel`. If AND is used, each `Condition` in + * `conditions` must be satisfied for the `AccessLevel` to be applied. If OR + * is used, at least one `Condition` in `conditions` must be satisfied for + * the `AccessLevel` to be applied. Default behavior is AND. + */ + combiningFunction?: string; + /** + * Required. A list of requirements for the `AccessLevel` to be granted. + */ + conditions?: Schema$Condition[]; + } + /** + * A condition necessary for an `AccessLevel` to be granted. The Condition is + * an AND over its fields. So a Condition is true if: 1) the request IP is + * from one of the listed subnetworks AND 2) the originating device complies + * with the listed device policy AND 3) all listed access levels are granted + * AND 4) the request was sent at a time allowed by the DateTimeRestriction. + */ + export interface Schema$Condition { + /** + * Device specific restrictions, all restrictions must hold for the + * Condition to be true. If not specified, all devices are allowed. + */ + devicePolicy?: Schema$DevicePolicy; + /** + * CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that + * for a CIDR IP address block, the specified IP address portion must be + * properly truncated (i.e. all the host bits must be zero) or the input is + * considered malformed. For example, "192.0.2.0/24" is accepted + * but "192.0.2.1/24" is not. Similarly, for IPv6, + * "2001:db8::/32" is accepted whereas "2001:db8::1/32" + * is not. The originating IP of a request must be in one of the listed + * subnets in order for this Condition to be true. If empty, all IP + * addresses are allowed. + */ + ipSubnetworks?: string[]; + /** + * The signed-in user originating the request must be a part of one of the + * provided members. Syntax: `user:{emailid}` `group:{emailid}` + * `serviceAccount:{emailid}` If not specified, a request may come from any + * user (logged in/not logged in, not present in any groups, etc.). + */ + members?: string[]; + /** + * Whether to negate the Condition. If true, the Condition becomes a NAND + * over its non-empty fields, each field must be false for the Condition + * overall to be satisfied. Defaults to false. + */ + negate?: boolean; + /** + * A list of other access levels defined in the same `Policy`, referenced by + * resource name. Referencing an `AccessLevel` which does not exist is an + * error. All access levels listed must be granted for the Condition to be + * true. Example: + * "`accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"` + */ + requiredAccessLevels?: string[]; + } + /** + * `DevicePolicy` specifies device specific restrictions necessary to acquire + * a given access level. A `DevicePolicy` specifies requirements for requests + * from devices to be granted access levels, it does not do any enforcement on + * the device. `DevicePolicy` acts as an AND over all specified fields, and + * each repeated field is an OR over its elements. Any unset fields are + * ignored. For example, if the proto is { os_type : DESKTOP_WINDOWS, os_type + * : DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will + * be true for requests originating from encrypted Linux desktops and + * encrypted Windows desktops. + */ + export interface Schema$DevicePolicy { + /** + * Allowed device management levels, an empty list allows all management + * levels. + */ + allowedDeviceManagementLevels?: string[]; + /** + * Allowed encryptions statuses, an empty list allows all statuses. + */ + allowedEncryptionStatuses?: string[]; + /** + * Allowed OS versions, an empty list allows all types and all versions. + */ + osConstraints?: Schema$OsConstraint[]; + /** + * Whether or not screenlock is required for the DevicePolicy to be true. + * Defaults to `false`. + */ + requireScreenlock?: boolean; + } + /** + * A response to `ListAccessLevelsRequest`. + */ + export interface Schema$ListAccessLevelsResponse { + /** + * List of the Access Level instances. + */ + accessLevels?: Schema$AccessLevel[]; + /** + * The pagination token to retrieve the next page of results. If the value + * is empty, no further results remain. + */ + nextPageToken?: string; + } + /** + * A response to `ListAccessPoliciesRequest`. + */ + export interface Schema$ListAccessPoliciesResponse { + /** + * List of the AccessPolicy instances. + */ + accessPolicies?: Schema$AccessPolicy[]; + /** + * The pagination token to retrieve the next page of results. If the value + * is empty, no further results remain. + */ + nextPageToken?: string; + } + /** + * A response to `ListServicePerimetersRequest`. + */ + export interface Schema$ListServicePerimetersResponse { + /** + * The pagination token to retrieve the next page of results. If the value + * is empty, no further results remain. + */ + nextPageToken?: string; + /** + * List of the Service Perimeter instances. + */ + servicePerimeters?: Schema$ServicePerimeter[]; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: any; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: any; + } + /** + * A restriction on the OS type and version of devices making requests. + */ + export interface Schema$OsConstraint { + /** + * The minimum allowed OS version. If not set, any version of this OS + * satisfies the constraint. Format: `"major.minor.patch"`. + * Examples: `"10.5.301"`, `"9.2.1"`. + */ + minimumVersion?: string; + /** + * Required. The allowed OS type. + */ + osType?: string; + } + /** + * `ServicePerimeter` describes a set of GCP resources which can freely import + * and export data amongst themselves, but not export outside of the + * `ServicePerimeter`. If a request with a source within this + * `ServicePerimeter` has a target outside of the `ServicePerimeter`, the + * request will be blocked. Otherwise the request is allowed. There are two + * types of Service Perimeter - Regular and Bridge. Regular Service Perimeters + * cannot overlap, a single GCP project can only belong to a single regular + * Service Perimeter. Service Perimeter Bridges can contain only GCP projects + * as members, a single GCP project may belong to multiple Service Perimeter + * Bridges. + */ + export interface Schema$ServicePerimeter { + /** + * Output only. Time the `ServicePerimeter` was created in UTC. + */ + createTime?: string; + /** + * Description of the `ServicePerimeter` and its use. Does not affect + * behavior. + */ + description?: string; + /** + * Required. Resource name for the ServicePerimeter. The `short_name` + * component must begin with a letter and only include alphanumeric and + * '_'. Format: + * `accessPolicies/{policy_id}/servicePerimeters/{short_name}` + */ + name?: string; + /** + * Perimeter type indicator. A single project is allowed to be a member of + * single regular perimeter, but multiple service perimeter bridges. A + * project cannot be a included in a perimeter bridge without being included + * in regular perimeter. For perimeter bridges, restricted/unrestricted + * service lists as well as access lists must be empty. + */ + perimeterType?: string; + /** + * Current ServicePerimeter configuration. Specifies sets of resources, + * restricted/unrestricted services and access levels that determine + * perimeter content and boundaries. + */ + status?: Schema$ServicePerimeterConfig; + /** + * Human readable title. Must be unique within the Policy. + */ + title?: string; + /** + * Output only. Time the `ServicePerimeter` was updated in UTC. + */ + updateTime?: string; + } + /** + * `ServicePerimeterConfig` specifies a set of GCP resources that describe + * specific Service Perimeter configuration. + */ + export interface Schema$ServicePerimeterConfig { + /** + * A list of `AccessLevel` resource names that allow resources within the + * `ServicePerimeter` to be accessed from the internet. `AccessLevels` + * listed must be in the same policy as this `ServicePerimeter`. Referencing + * a nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names + * are listed, resources within the perimeter can only be accessed via GCP + * calls with request origins within the perimeter. Example: + * `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. For Service + * Perimeter Bridge, must be empty. + */ + accessLevels?: string[]; + /** + * A list of GCP resources that are inside of the service perimeter. + * Currently only projects are allowed. Format: `projects/{project_number}` + */ + resources?: string[]; + /** + * GCP services that are subject to the Service Perimeter restrictions. May + * contain a list of services or a single wildcard "*". For + * example, if `storage.googleapis.com` is specified, access to the storage + * buckets inside the perimeter must meet the perimeter's access + * restrictions. Wildcard means that unless explicitly specified by + * "unrestricted_services" list, any service is treated as + * restricted. One of the fields "restricted_services", + * "unrestricted_services" must contain a wildcard "*", + * otherwise the Service Perimeter specification is invalid. It also means + * that both field being empty is invalid as well. + * "restricted_services" can be empty if and only if + * "unrestricted_services" list contains a "*" wildcard. + */ + restrictedServices?: string[]; + /** + * GCP services that are not subject to the Service Perimeter restrictions. + * May contain a list of services or a single wildcard "*". For + * example, if `logging.googleapis.com` is unrestricted, users can access + * logs inside the perimeter as if the perimeter doesn't exist, and it + * also means VMs inside the perimeter can access logs outside the + * perimeter. The wildcard means that unless explicitly specified by + * "restricted_services" list, any service is treated as + * unrestricted. One of the fields "restricted_services", + * "unrestricted_services" must contain a wildcard "*", + * otherwise the Service Perimeter specification is invalid. It also means + * that both field being empty is invalid as well. + * "unrestricted_services" can be empty if and only if + * "restricted_services" list contains a "*" wildcard. + */ + unrestrictedServices?: string[]; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: any[]; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + + + export class Resource$Accesspolicies { + root: Accesscontextmanager; + accessLevels: Resource$Accesspolicies$Accesslevels; + servicePerimeters: Resource$Accesspolicies$Serviceperimeters; + constructor(root: Accesscontextmanager) { + this.root = root; + this.getRoot.bind(this); + this.accessLevels = new Resource$Accesspolicies$Accesslevels(root); + this.servicePerimeters = + new Resource$Accesspolicies$Serviceperimeters(root); + } + + getRoot() { + return this.root; + } + + + /** + * accesscontextmanager.accessPolicies.create + * @desc Create an `AccessPolicy`. Fails if this organization already has a + * `AccessPolicy`. The longrunning Operation will have a successful status + * once the `AccessPolicy` has propagated to long-lasting storage. Syntactic + * and basic semantic errors will be returned in `metadata` as a BadRequest + * proto. + * @alias accesscontextmanager.accessPolicies.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().AccessPolicy} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Accesspolicies$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Accesspolicies$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Accesspolicies$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Accesspolicies$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accesspolicies$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/accessPolicies') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.delete + * @desc Delete an AccessPolicy by resource name. The longrunning Operation + * will have a successful status once the AccessPolicy has been removed from + * long-lasting storage. + * @alias accesscontextmanager.accessPolicies.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name for the access policy to delete. Format `accessPolicies/{policy_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Accesspolicies$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Accesspolicies$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Accesspolicies$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Accesspolicies$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accesspolicies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.get + * @desc Get an AccessPolicy by name. + * @alias accesscontextmanager.accessPolicies.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name for the access policy to get. Format `accessPolicies/{policy_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Accesspolicies$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accesspolicies$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accesspolicies$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accesspolicies$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accesspolicies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.list + * @desc List all AccessPolicies under a container. + * @alias accesscontextmanager.accessPolicies.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Number of AccessPolicy instances to include in the list. Default 100. + * @param {string=} params.pageToken Next page token for the next batch of AccessPolicy instances. Defaults to the first page of results. + * @param {string=} params.parent Required. Resource name for the container to list AccessPolicy instances from. Format: `organizations/{org_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Accesspolicies$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Accesspolicies$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Accesspolicies$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Accesspolicies$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accesspolicies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/accessPolicies') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.patch + * @desc Update an AccessPolicy. The longrunning Operation from this RPC + * will have a successful status once the changes to the AccessPolicy have + * propagated to long-lasting storage. Syntactic and basic semantic errors + * will be returned in `metadata` as a BadRequest proto. + * @alias accesscontextmanager.accessPolicies.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/{policy_id}` + * @param {string=} params.updateMask Required. Mask to control which fields get updated. Must be non-empty. + * @param {().AccessPolicy} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Accesspolicies$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Accesspolicies$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Accesspolicies$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Accesspolicies$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Accesspolicies$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accesspolicies$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + + /** + * Request body metadata + */ + requestBody?: Schema$AccessPolicy; + } + export interface Params$Resource$Accesspolicies$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the access policy to delete. Format + * `accessPolicies/{policy_id}` + */ + name?: string; + } + export interface Params$Resource$Accesspolicies$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the access policy to get. Format + * `accessPolicies/{policy_id}` + */ + name?: string; + } + export interface Params$Resource$Accesspolicies$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Number of AccessPolicy instances to include in the list. Default 100. + */ + pageSize?: number; + /** + * Next page token for the next batch of AccessPolicy instances. Defaults to + * the first page of results. + */ + pageToken?: string; + /** + * Required. Resource name for the container to list AccessPolicy instances + * from. Format: `organizations/{org_id}` + */ + parent?: string; + } + export interface Params$Resource$Accesspolicies$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Output only. Resource name of the `AccessPolicy`. Format: + * `accessPolicies/{policy_id}` + */ + name?: string; + /** + * Required. Mask to control which fields get updated. Must be non-empty. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccessPolicy; + } + + export class Resource$Accesspolicies$Accesslevels { + root: Accesscontextmanager; + constructor(root: Accesscontextmanager) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * accesscontextmanager.accessPolicies.accessLevels.create + * @desc Create an Access Level. The longrunning operation from this RPC + * will have a successful status once the Access Level has propagated to + * long-lasting storage. Access Levels containing errors will result in an + * error response for the first error encountered. + * @alias accesscontextmanager.accessPolicies.accessLevels.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. Resource name for the access policy which owns this Access Level. Format: `accessPolicies/{policy_id}` + * @param {().AccessLevel} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Accesspolicies$Accesslevels$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Accesspolicies$Accesslevels$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Accesspolicies$Accesslevels$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Accesspolicies$Accesslevels$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Accesslevels$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Accesslevels$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}/accessLevels') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.accessLevels.delete + * @desc Delete an Access Level by resource name. The longrunning operation + * from this RPC will have a successful status once the Access Level has + * been removed from long-lasting storage. + * @alias accesscontextmanager.accessPolicies.accessLevels.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name for the Access Level. Format: `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Accesspolicies$Accesslevels$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Accesspolicies$Accesslevels$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Accesspolicies$Accesslevels$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Accesspolicies$Accesslevels$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Accesslevels$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Accesslevels$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.accessLevels.get + * @desc Get an Access Level by resource name. + * @alias accesscontextmanager.accessPolicies.accessLevels.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.accessLevelFormat Whether to return `BasicLevels` in the Cloud Common Expression Language rather than as `BasicLevels`. Defaults to AS_DEFINED, where Access Levels are returned as `BasicLevels` or `CustomLevels` based on how they were created. If set to CEL, all Access Levels are returned as `CustomLevels`. In the CEL case, `BasicLevels` are translated to equivalent `CustomLevels`. + * @param {string} params.name Required. Resource name for the Access Level. Format: `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Accesspolicies$Accesslevels$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accesspolicies$Accesslevels$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accesspolicies$Accesslevels$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accesspolicies$Accesslevels$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Accesslevels$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Accesslevels$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.accessLevels.list + * @desc List all Access Levels for an access policy. + * @alias accesscontextmanager.accessPolicies.accessLevels.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.accessLevelFormat Whether to return `BasicLevels` in the Cloud Common Expression language, as `CustomLevels`, rather than as `BasicLevels`. Defaults to returning `AccessLevels` in the format they were defined. + * @param {integer=} params.pageSize Number of Access Levels to include in the list. Default 100. + * @param {string=} params.pageToken Next page token for the next batch of Access Level instances. Defaults to the first page of results. + * @param {string} params.parent Required. Resource name for the access policy to list Access Levels from. Format: `accessPolicies/{policy_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Accesspolicies$Accesslevels$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Accesspolicies$Accesslevels$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Accesspolicies$Accesslevels$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Accesspolicies$Accesslevels$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Accesslevels$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Accesslevels$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}/accessLevels') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.accessLevels.patch + * @desc Update an Access Level. The longrunning operation from this RPC + * will have a successful status once the changes to the Access Level have + * propagated to long-lasting storage. Access Levels containing errors will + * result in an error response for the first error encountered. + * @alias accesscontextmanager.accessPolicies.accessLevels.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name for the Access Level. The `short_name` component must begin with a letter and only include alphanumeric and '_'. Format: `accessPolicies/{policy_id}/accessLevels/{short_name}` + * @param {string=} params.updateMask Required. Mask to control which fields get updated. Must be non-empty. + * @param {().AccessLevel} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Accesspolicies$Accesslevels$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Accesspolicies$Accesslevels$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Accesspolicies$Accesslevels$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Accesspolicies$Accesslevels$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Accesslevels$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Accesslevels$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accesspolicies$Accesslevels$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the access policy which owns this Access + * Level. Format: `accessPolicies/{policy_id}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccessLevel; + } + export interface Params$Resource$Accesspolicies$Accesslevels$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the Access Level. Format: + * `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + */ + name?: string; + } + export interface Params$Resource$Accesspolicies$Accesslevels$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Whether to return `BasicLevels` in the Cloud Common Expression Language + * rather than as `BasicLevels`. Defaults to AS_DEFINED, where Access Levels + * are returned as `BasicLevels` or `CustomLevels` based on how they were + * created. If set to CEL, all Access Levels are returned as `CustomLevels`. + * In the CEL case, `BasicLevels` are translated to equivalent + * `CustomLevels`. + */ + accessLevelFormat?: string; + /** + * Required. Resource name for the Access Level. Format: + * `accessPolicies/{policy_id}/accessLevels/{access_level_id}` + */ + name?: string; + } + export interface Params$Resource$Accesspolicies$Accesslevels$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Whether to return `BasicLevels` in the Cloud Common Expression language, + * as `CustomLevels`, rather than as `BasicLevels`. Defaults to returning + * `AccessLevels` in the format they were defined. + */ + accessLevelFormat?: string; + /** + * Number of Access Levels to include in the list. Default 100. + */ + pageSize?: number; + /** + * Next page token for the next batch of Access Level instances. Defaults to + * the first page of results. + */ + pageToken?: string; + /** + * Required. Resource name for the access policy to list Access Levels from. + * Format: `accessPolicies/{policy_id}` + */ + parent?: string; + } + export interface Params$Resource$Accesspolicies$Accesslevels$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the Access Level. The `short_name` component + * must begin with a letter and only include alphanumeric and '_'. Format: + * `accessPolicies/{policy_id}/accessLevels/{short_name}` + */ + name?: string; + /** + * Required. Mask to control which fields get updated. Must be non-empty. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccessLevel; + } + + + export class Resource$Accesspolicies$Serviceperimeters { + root: Accesscontextmanager; + constructor(root: Accesscontextmanager) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * accesscontextmanager.accessPolicies.servicePerimeters.create + * @desc Create an Service Perimeter. The longrunning operation from this + * RPC will have a successful status once the Service Perimeter has + * propagated to long-lasting storage. Service Perimeters containing errors + * will result in an error response for the first error encountered. + * @alias accesscontextmanager.accessPolicies.servicePerimeters.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. Resource name for the access policy which owns this Service Perimeter. Format: `accessPolicies/{policy_id}` + * @param {().ServicePerimeter} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Accesspolicies$Serviceperimeters$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Accesspolicies$Serviceperimeters$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Accesspolicies$Serviceperimeters$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + Params$Resource$Accesspolicies$Serviceperimeters$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Serviceperimeters$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Serviceperimeters$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}/servicePerimeters') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.servicePerimeters.delete + * @desc Delete an Service Perimeter by resource name. The longrunning + * operation from this RPC will have a successful status once the Service + * Perimeter has been removed from long-lasting storage. + * @alias accesscontextmanager.accessPolicies.servicePerimeters.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name for the Service Perimeter. Format: `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Accesspolicies$Serviceperimeters$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Accesspolicies$Serviceperimeters$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Accesspolicies$Serviceperimeters$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + Params$Resource$Accesspolicies$Serviceperimeters$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Serviceperimeters$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Serviceperimeters$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.servicePerimeters.get + * @desc Get an Service Perimeter by resource name. + * @alias accesscontextmanager.accessPolicies.servicePerimeters.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name for the Service Perimeter. Format: `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Accesspolicies$Serviceperimeters$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Accesspolicies$Serviceperimeters$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Accesspolicies$Serviceperimeters$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Accesspolicies$Serviceperimeters$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Serviceperimeters$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Serviceperimeters$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.servicePerimeters.list + * @desc List all Service Perimeters for an access policy. + * @alias accesscontextmanager.accessPolicies.servicePerimeters.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Number of Service Perimeters to include in the list. Default 100. + * @param {string=} params.pageToken Next page token for the next batch of Service Perimeter instances. Defaults to the first page of results. + * @param {string} params.parent Required. Resource name for the access policy to list Service Perimeters from. Format: `accessPolicies/{policy_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Accesspolicies$Serviceperimeters$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Accesspolicies$Serviceperimeters$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + list( + params: Params$Resource$Accesspolicies$Serviceperimeters$List, + callback: BodyResponseCallback): + void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: + Params$Resource$Accesspolicies$Serviceperimeters$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Serviceperimeters$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Serviceperimeters$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}/servicePerimeters') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * accesscontextmanager.accessPolicies.servicePerimeters.patch + * @desc Update an Service Perimeter. The longrunning operation from this + * RPC will have a successful status once the changes to the Service + * Perimeter have propagated to long-lasting storage. Service Perimeter + * containing errors will result in an error response for the first error + * encountered. + * @alias accesscontextmanager.accessPolicies.servicePerimeters.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name for the ServicePerimeter. The `short_name` component must begin with a letter and only include alphanumeric and '_'. Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}` + * @param {string=} params.updateMask Required. Mask to control which fields get updated. Must be non-empty. + * @param {().ServicePerimeter} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Accesspolicies$Serviceperimeters$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Accesspolicies$Serviceperimeters$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Accesspolicies$Serviceperimeters$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + Params$Resource$Accesspolicies$Serviceperimeters$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Accesspolicies$Serviceperimeters$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accesspolicies$Serviceperimeters$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Accesspolicies$Serviceperimeters$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the access policy which owns this Service + * Perimeter. Format: `accessPolicies/{policy_id}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ServicePerimeter; + } + export interface Params$Resource$Accesspolicies$Serviceperimeters$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the Service Perimeter. Format: + * `accessPolicies/{policy_id}/servicePerimeters/{service_perimeter_id}` + */ + name?: string; + } + export interface Params$Resource$Accesspolicies$Serviceperimeters$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the Service Perimeter. Format: + * `accessPolicies/{policy_id}/servicePerimeters/{service_perimeters_id}` + */ + name?: string; + } + export interface Params$Resource$Accesspolicies$Serviceperimeters$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Number of Service Perimeters to include in the list. Default 100. + */ + pageSize?: number; + /** + * Next page token for the next batch of Service Perimeter instances. + * Defaults to the first page of results. + */ + pageToken?: string; + /** + * Required. Resource name for the access policy to list Service Perimeters + * from. Format: `accessPolicies/{policy_id}` + */ + parent?: string; + } + export interface Params$Resource$Accesspolicies$Serviceperimeters$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource name for the ServicePerimeter. The `short_name` + * component must begin with a letter and only include alphanumeric and '_'. + * Format: `accessPolicies/{policy_id}/servicePerimeters/{short_name}` + */ + name?: string; + /** + * Required. Mask to control which fields get updated. Must be non-empty. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ServicePerimeter; + } + + + + export class Resource$Operations { + root: Accesscontextmanager; + constructor(root: Accesscontextmanager) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * accesscontextmanager.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias accesscontextmanager.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Operations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Operations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Operations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://accesscontextmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } +} diff --git a/src/apis/adexchangebuyer2/v2beta1.ts b/src/apis/adexchangebuyer2/v2beta1.ts index eb382c95525..d73281a4c7b 100644 --- a/src/apis/adexchangebuyer2/v2beta1.ts +++ b/src/apis/adexchangebuyer2/v2beta1.ts @@ -32,9 +32,9 @@ export namespace adexchangebuyer2_v2beta1 { /** * Ad Exchange Buyer API II * - * Accesses the latest features for managing Ad Exchange accounts, Real-Time - * Bidding configurations and auction metrics, and Marketplace programmatic - * deals. + * Accesses the latest features for managing Authorized Buyers accounts, + * Real-Time Bidding configurations and auction metrics, and Marketplace + * programmatic deals. * * @example * const {google} = require('googleapis'); @@ -210,12 +210,12 @@ export namespace adexchangebuyer2_v2beta1 { status?: string; } /** - * Represents a buyer of inventory. Each buyer is identified by a unique Ad - * Exchange account ID. + * Represents a buyer of inventory. Each buyer is identified by a unique + * Authorized Buyers account ID. */ export interface Schema$Buyer { /** - * Ad Exchange account ID of the buyer. + * Authorized Buyers account ID of the buyer. */ accountId?: string; } @@ -227,7 +227,7 @@ export namespace adexchangebuyer2_v2beta1 { export interface Schema$CalloutStatusRow { /** * The ID of the callout status. See - * [callout-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/callout-status-codes). + * [callout-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/callout-status-codes). */ calloutStatusId?: number; /** @@ -247,10 +247,9 @@ export namespace adexchangebuyer2_v2beta1 { /** * A client resource represents a client buyer&mdash;an agency, a brand, * or an advertiser customer of the sponsor buyer. Users associated with the - * client buyer have restricted access to the Ad Exchange Marketplace and - * certain other sections of the Ad Exchange Buyer UI based on the role - * granted to the client buyer. All fields are required unless otherwise - * specified. + * client buyer have restricted access to the Marketplace and certain other + * sections of the Authorized Buyers UI based on the role granted to the + * client buyer. All fields are required unless otherwise specified. */ export interface Schema$Client { /** @@ -317,11 +316,11 @@ export namespace adexchangebuyer2_v2beta1 { } /** * A client user is created under a client buyer and has restricted access to - * the Ad Exchange Marketplace and certain other sections of the Ad Exchange - * Buyer UI based on the role granted to the associated client buyer. The - * only way a new client user can be created is via accepting an email - * invitation (see the accounts.clients.invitations.create method). All - * fields are required unless otherwise specified. + * the Marketplace and certain other sections of the Authorized Buyers UI + * based on the role granted to the associated client buyer. The only way a + * new client user can be created is via accepting an email invitation (see + * the accounts.clients.invitations.create method). All fields are required + * unless otherwise specified. */ export interface Schema$ClientUser { /** @@ -346,7 +345,7 @@ export namespace adexchangebuyer2_v2beta1 { userId?: string; } /** - * An invitation for a new client user to get access to the Ad Exchange Buyer + * An invitation for a new client user to get access to the Authorized Buyers * UI. All fields are required unless otherwise specified. */ export interface Schema$ClientUserInvitation { @@ -555,8 +554,8 @@ export namespace adexchangebuyer2_v2beta1 { } /** * Represents creative restrictions associated to Programmatic Guaranteed/ - * Preferred Deal in DFP. This doesn't apply to Private Auction and AdX - * Preferred Deals. + * Preferred Deal in Ad Manager. This doesn't apply to Private Auction and + * AdX Preferred Deals. */ export interface Schema$CreativeRestrictions { /** @@ -575,7 +574,7 @@ export namespace adexchangebuyer2_v2beta1 { export interface Schema$CreativeSize { /** * What formats are allowed by the publisher. If this repeated field is - * empty then all formats are allowed. E.g., if this field contains + * empty then all formats are allowed. For example, if this field contains * AllowedFormatType.AUDIO then the publisher only allows an audio ad * (without any video). */ @@ -607,7 +606,7 @@ export namespace adexchangebuyer2_v2beta1 { } /** * Represents information for a creative that is associated with a - * Programmatic Guaranteed/Preferred Deal in DFP. + * Programmatic Guaranteed/Preferred Deal in Ad Manager. */ export interface Schema$CreativeSpecification { /** @@ -631,7 +630,7 @@ export namespace adexchangebuyer2_v2beta1 { bidCount?: Schema$MetricValue; /** * The ID of the creative status. See - * [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). */ creativeStatusId?: number; /** @@ -763,9 +762,9 @@ export namespace adexchangebuyer2_v2beta1 { */ creativePreApprovalPolicy?: string; /** - * Restricitions about the creatives associated with the deal (i.e. size) - * This is available for Programmatic Guaranteed/Preferred Deals in DFP. - * @OutputOnly + * Restricitions about the creatives associated with the deal (i.e., size) + * This is available for Programmatic Guaranteed/Preferred Deals in Ad + * Manager. @OutputOnly */ creativeRestrictions?: Schema$CreativeRestrictions; /** @@ -1020,8 +1019,8 @@ export namespace adexchangebuyer2_v2beta1 { * A set of filters that is applied to a request for data. Within a filter * set, an AND operation is performed across the filters represented by each * field. An OR operation is performed across the filters represented by the - * multiple values of a repeated field. E.g. "format=VIDEO AND deal_id=12 - * AND (seller_network_id=34 OR seller_network_id=56)" + * multiple values of a repeated field, e.g., "format=VIDEO AND + * deal_id=12 AND (seller_network_id=34 OR seller_network_id=56)". */ export interface Schema$FilterSet { /** @@ -1032,14 +1031,14 @@ export namespace adexchangebuyer2_v2beta1 { /** * The ID of the creative on which to filter; optional. This field may be * set only for a filter set that accesses account-level troubleshooting - * data, i.e. one whose name matches the `bidders/x/accounts/x/filterSets/x + * data, i.e., one whose name matches the `bidders/x/accounts/x/filterSets/x * pattern. */ creativeId?: string; /** * The ID of the deal on which to filter; optional. This field may be set * only for a filter set that accesses account-level troubleshooting data, - * i.e. one whose name matches the `bidders/x/accounts/x/filterSets/x + * i.e., one whose name matches the `bidders/x/accounts/x/filterSets/x * pattern. */ dealId?: string; @@ -1049,7 +1048,7 @@ export namespace adexchangebuyer2_v2beta1 { environment?: string; /** * The list of formats on which to filter; may be empty. The filters - * represented by multiple formats are ORed together (i.e. if non-empty, + * represented by multiple formats are ORed together (i.e., if non-empty, * results must match any one of the formats). */ formats?: string[]; @@ -1063,12 +1062,12 @@ export namespace adexchangebuyer2_v2beta1 { name?: string; /** * The list of platforms on which to filter; may be empty. The filters - * represented by multiple platforms are ORed together (i.e. if non-empty, + * represented by multiple platforms are ORed together (i.e., if non-empty, * results must match any one of the platforms). */ platforms?: string[]; /** - * For Exchange Bidding buyers only. The list of publisher identifiers on + * For Open Bidding partners only. The list of publisher identifiers on * which to filter; may be empty. The filters represented by multiple * publisher identifiers are ORed together. */ @@ -1084,11 +1083,11 @@ export namespace adexchangebuyer2_v2beta1 { */ relativeDateRange?: Schema$RelativeDateRange; /** - * For Ad Exchange buyers only. The list of IDs of the seller (publisher) + * For Authorized Buyers only. The list of IDs of the seller (publisher) * networks on which to filter; may be empty. The filters represented by - * multiple seller network IDs are ORed together (i.e. if non-empty, results - * must match any one of the publisher networks). See - * [seller-network-ids](https://developers.google.com/ad-exchange/rtb/downloads/seller-network-ids) + * multiple seller network IDs are ORed together (i.e., if non-empty, + * results must match any one of the publisher networks). See + * [seller-network-ids](https://developers.google.com/authorized-buyers/rtb/downloads/seller-network-ids) * file for the set of existing seller network IDs. */ sellerNetworkIds?: number[]; @@ -1233,7 +1232,7 @@ export namespace adexchangebuyer2_v2beta1 { * Represents the size of an ad unit that can be targeted on an ad request. It * only applies to Private Auction, AdX Preferred Deals and Auction Packages. * This targeting does not apply to Programmatic Guaranteed and Preferred - * Deals in DFP. + * Deals in Ad Manager. */ export interface Schema$InventorySizeTargeting { /** @@ -1567,11 +1566,12 @@ export namespace adexchangebuyer2_v2beta1 { */ inventorySizeTargeting?: Schema$InventorySizeTargeting; /** - * Placement targeting information, e.g. URL, mobile applications. + * Placement targeting information, e.g., URL, mobile applications. */ placementTargeting?: Schema$PlacementTargeting; /** - * Technology targeting information, e.g. operating system, device category. + * Technology targeting information, e.g., operating system, device + * category. */ technologyTargeting?: Schema$TechnologyTargeting; /** @@ -1784,7 +1784,7 @@ export namespace adexchangebuyer2_v2beta1 { reason?: string; } /** - * Represents targeting about where the ads can appear, e.g. certain sites or + * Represents targeting about where the ads can appear, e.g., certain sites or * mobile applications. Different placement targeting types will be logically * OR'ed. */ @@ -1900,7 +1900,7 @@ export namespace adexchangebuyer2_v2beta1 { */ productId?: string; /** - * The revision number of the product. (auto-assigned by marketplace) + * The revision number of the product (auto-assigned by Marketplace). */ productRevision?: string; /** @@ -1939,7 +1939,7 @@ export namespace adexchangebuyer2_v2beta1 { /** * Note: this resource requires whitelisting for access. Please contact your * account manager for access to Marketplace resources. Represents a proposal - * in the marketplace. A proposal is the unit of negotiation between a seller + * in the Marketplace. A proposal is the unit of negotiation between a seller * and a buyer and contains deals which are served. Note: you can not update, * create, or otherwise modify Private Auction or Preferred Deals deals * through the API. Fields are updatable unless noted otherwise. @@ -2141,19 +2141,19 @@ export namespace adexchangebuyer2_v2beta1 { } /** * A relative date range, specified by an offset and a duration. The supported - * range of dates begins 30 days before today and ends today. I.e. the limits + * range of dates begins 30 days before today and ends today, i.e., the limits * for these values are: offset_days >= 0 duration_days >= 1 offset_days * + duration_days <= 30 */ export interface Schema$RelativeDateRange { /** - * The number of days in the requested date range. E.g. for a range spanning - * today, 1. For a range spanning the last 7 days, 7. + * The number of days in the requested date range, e.g., for a range + * spanning today: 1. For a range spanning the last 7 days: 7. */ durationDays?: number; /** * The end date of the filter set, specified as the number of days before - * today. E.g. for a range where the last date is today, 0. + * today, e.g., for a range where the last date is today: 0. */ offsetDays?: number; } @@ -2192,7 +2192,7 @@ export namespace adexchangebuyer2_v2beta1 { } /** * Represents a seller of inventory. Each seller is identified by a unique Ad - * Exchange account ID. + * Manager account ID. */ export interface Schema$Seller { /** @@ -2318,7 +2318,7 @@ export namespace adexchangebuyer2_v2beta1 { /** * The daypart targeting to include / exclude. Filled in when the key is * GOOG_DAYPART_TARGETING. The definition of this targeting is derived from - * the structure used by DFP. + * the structure used by Ad Manager. */ dayPartTargetingValue?: Schema$DayPartTargeting; /** @@ -2389,10 +2389,10 @@ export namespace adexchangebuyer2_v2beta1 { seconds?: number; } /** - * Represents a list of targeted and excluded URLs (e.g google.com). For + * Represents a list of targeted and excluded URLs (e.g., google.com). For * Private Auction and AdX Preferred Deals, URLs are either included or - * excluded. For DFP Programmatic Guaranteed and Preferred Deals, this - * doesn't apply. + * excluded. For Programmatic Guaranteed and Preferred Deals, this doesn't + * apply. */ export interface Schema$UrlTargeting { /** @@ -4568,7 +4568,7 @@ export namespace adexchangebuyer2_v2beta1 { * * @param {object} params Parameters for request * @param {string} params.accountId Account ID of the buyer. - * @param {string=} params.filter An optional PQL query used to query for products. See https://developers.google.com/doubleclick-publishers/docs/pqlreference for documentation about PQL and examples. Nested repeated fields, such as product.targetingCriterion.inclusions, cannot be filtered. + * @param {string=} params.filter An optional PQL query used to query for products. See https://developers.google.com/ad-manager/docs/pqlreference for documentation about PQL and examples. Nested repeated fields, such as product.targetingCriterion.inclusions, cannot be filtered. * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. * @param {string=} params.pageToken The page token as returned from ListProductsResponse. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -4659,9 +4659,9 @@ export namespace adexchangebuyer2_v2beta1 { accountId?: string; /** * An optional PQL query used to query for products. See - * https://developers.google.com/doubleclick-publishers/docs/pqlreference - * for documentation about PQL and examples. Nested repeated fields, such - * as product.targetingCriterion.inclusions, cannot be filtered. + * https://developers.google.com/ad-manager/docs/pqlreference for + * documentation about PQL and examples. Nested repeated fields, such as + * product.targetingCriterion.inclusions, cannot be filtered. */ filter?: string; /** @@ -5882,7 +5882,7 @@ export namespace adexchangebuyer2_v2beta1 { * * @param {object} params Parameters for request * @param {string} params.creativeId The ID of the creative to delete. - * @param {string} params.ownerName Name of the owner (bidder or account) of the creative to be deleted. For example: - For an account-level creative for the buyer account representing bidder 123: `bidders/123/accounts/123/` - For an account-level creative for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/` + * @param {string} params.ownerName Name of the owner (bidder or account) of the creative to be deleted. For example: - For an account-level creative for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level creative for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456` * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -5955,9 +5955,9 @@ export namespace adexchangebuyer2_v2beta1 { /** * Name of the owner (bidder or account) of the creative to be deleted. For * example: - For an account-level creative for the buyer account - * representing bidder 123: `bidders/123/accounts/123/` - For an + * representing bidder 123: `bidders/123/accounts/123` - For an * account-level creative for the child seat buyer account 456 whose - * bidder is 123: `bidders/123/accounts/456/` + * bidder is 123: `bidders/123/accounts/456` */ ownerName?: string; } @@ -7009,7 +7009,7 @@ export namespace adexchangebuyer2_v2beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). * @param {string} params.filterSetName Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc` * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. * @param {string=} params.pageToken A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from the previous call to the filteredBids.creatives.list method. @@ -7098,7 +7098,7 @@ export namespace adexchangebuyer2_v2beta1 { /** * The ID of the creative status for which to retrieve a breakdown by * creative. See - * [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). */ creativeStatusId?: number; /** @@ -7147,7 +7147,7 @@ export namespace adexchangebuyer2_v2beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87. + * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87. * @param {string} params.filterSetName Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc` * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. * @param {string=} params.pageToken A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the previous call to the filteredBids.details.list method. @@ -7236,7 +7236,7 @@ export namespace adexchangebuyer2_v2beta1 { /** * The ID of the creative status for which to retrieve a breakdown by * detail. See - * [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). * Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, * and 87. */ @@ -8666,7 +8666,7 @@ export namespace adexchangebuyer2_v2beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). * @param {string} params.filterSetName Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc` * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. * @param {string=} params.pageToken A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from the previous call to the filteredBids.creatives.list method. @@ -8752,7 +8752,7 @@ export namespace adexchangebuyer2_v2beta1 { /** * The ID of the creative status for which to retrieve a breakdown by * creative. See - * [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). */ creativeStatusId?: number; /** @@ -8800,7 +8800,7 @@ export namespace adexchangebuyer2_v2beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87. + * @param {integer} params.creativeStatusId The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87. * @param {string} params.filterSetName Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc` * @param {integer=} params.pageSize Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default. * @param {string=} params.pageToken A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the previous call to the filteredBids.details.list method. @@ -8886,7 +8886,7 @@ export namespace adexchangebuyer2_v2beta1 { /** * The ID of the creative status for which to retrieve a breakdown by * detail. See - * [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes). + * [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). * Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, * and 87. */ diff --git a/src/apis/admin/directory_v1.ts b/src/apis/admin/directory_v1.ts index eb671edbd1a..f6f1a9489e8 100644 --- a/src/apis/admin/directory_v1.ts +++ b/src/apis/admin/directory_v1.ts @@ -476,6 +476,10 @@ export namespace admin_directory_v1 { * Chromebook boot mode (Read-only) */ bootMode?: string; + /** + * Reports of CPU utilization and temperature (Read-only) + */ + cpuStatusReports?: any[]; /** * List of device files to download (Read-only) */ @@ -484,6 +488,10 @@ export namespace admin_directory_v1 { * Unique identifier of Chrome OS Device (Read-only) */ deviceId?: string; + /** + * Reports of disk space and other info about mounted/connected volumes. + */ + diskVolumeReports?: any[]; /** * ETag of the resource. */ @@ -559,6 +567,14 @@ export namespace admin_directory_v1 { * Final date the device will be supported (Read-only) */ supportEndDate?: string; + /** + * Reports of amounts of available RAM memory (Read-only) + */ + systemRamFreeReports?: any[]; + /** + * Total RAM on the device [in bytes] (Read-only) + */ + systemRamTotal?: string; /** * Trusted Platform Module (TPM) (Read-only) */ diff --git a/src/apis/alertcenter/README.md b/src/apis/alertcenter/README.md new file mode 100644 index 00000000000..765e9affc10 --- /dev/null +++ b/src/apis/alertcenter/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/alertcenter + +> G Suite Alert Center API to view and manage alerts on issues affecting your domain. + +## Installation + +```sh +$ npm install @google/alertcenter +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/alertcenter/index.ts b/src/apis/alertcenter/index.ts new file mode 100644 index 00000000000..a9ca82b1987 --- /dev/null +++ b/src/apis/alertcenter/index.ts @@ -0,0 +1,31 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {alertcenter_v1beta1} from './v1beta1'; + +export const VERSIONS = { + 'v1beta1': alertcenter_v1beta1.Alertcenter, +}; + +export function alertcenter(version: 'v1beta1'): + alertcenter_v1beta1.Alertcenter; +export function alertcenter(options: alertcenter_v1beta1.Options): + alertcenter_v1beta1.Alertcenter; +export function alertcenter( + this: GoogleConfigurable, + versionOrOptions: 'v1beta1'|alertcenter_v1beta1.Options) { + return getAPI('alertcenter', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/alertcenter/package.json b/src/apis/alertcenter/package.json new file mode 100644 index 00000000000..add7ec3f07a --- /dev/null +++ b/src/apis/alertcenter/package.json @@ -0,0 +1,24 @@ +{ + "name": "@google/alertcenter", + "version": "0.1.0", + "description": "alertcenter", + "main": "index.js", + "types": "index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "dependencies": { + "googleapis-common": "^0.2.0" + } +} diff --git a/src/apis/alertcenter/v1beta1.ts b/src/apis/alertcenter/v1beta1.ts new file mode 100644 index 00000000000..4b8b0d9f66d --- /dev/null +++ b/src/apis/alertcenter/v1beta1.ts @@ -0,0 +1,1036 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace alertcenter_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + /** + * G Suite Alert Center API + * + * G Suite API for alerts managment. + * + * @example + * const {google} = require('googleapis'); + * const alertcenter = google.alertcenter('v1beta1'); + * + * @namespace alertcenter + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for Alertcenter + */ + export class Alertcenter { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + alerts: Resource$Alerts; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.alerts = new Resource$Alerts(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Alerts for user account warning events. + */ + export interface Schema$AccountWarning { + /** + * Required. Email of the user that this event belongs to. + */ + email?: string; + /** + * Optional. Details of the login action associated with the warning event. + * This is only available for: Suspicious login Suspicious login (less + * secure app) User suspended (suspicious activity) + */ + loginDetails?: Schema$LoginDetails; + } + /** + * An alert affecting a customer. All fields are read-only once created. + */ + export interface Schema$Alert { + /** + * Output only. The unique identifier for the alert. + */ + alertId?: string; + /** + * Output only. The time this alert was created. Assigned by the server. + */ + createTime?: string; + /** + * Output only. The unique identifier of the Google account of the customer. + */ + customerId?: string; + /** + * Optional. Specific data associated with this alert. e.g. + * google.apps.alertcenter.type.DeviceCompromised. + */ + data?: any; + /** + * Optional. The time this alert was no longer active. If provided, the end + * time must not be earlier than the start time. If not provided, the end + * time will default to the start time. + */ + endTime?: string; + /** + * Output only. An optional Security Investigation Tool query for this + * alert. + */ + securityInvestigationToolLink?: string; + /** + * Required. A unique identifier for the system that is reported the alert. + * Supported sources are any of the following: * "Google + * Operations" * "Mobile device management" * "Gmail + * phishing" * "Domain wide takeout" * "Government + * attack warning" * "Google identity" + */ + source?: string; + /** + * Required. The time this alert became active. + */ + startTime?: string; + /** + * Required. The type of the alert. Supported types are any of the + * following: * "Google Operations" * "Device + * compromised" * "Suspicious activity" * "User + * reported phishing" * "Misconfigured whitelist" * + * "Customer takeout initiated" * "Government attack + * warning" * "User reported spam spike" * "Suspicious + * message reported" * "Phishing reclassification" * + * "Malware reclassification" LINT.IfChange * "Suspicious + * login" * "Suspicious login (less secure app)" * + * "User suspended" * "Leaked password" * "User + * suspended (suspicious activity)" * "User suspended + * (spam)" * "User suspended (spam through relay)" + * LINT.ThenChange(//depot/google3/apps/albert/data/albert_enums.proto) + */ + type?: string; + } + /** + * A customer feedback about an alert. + */ + export interface Schema$AlertFeedback { + /** + * Output only. The alert identifier. + */ + alertId?: string; + /** + * Output only. The time this feedback was created. Assigned by the server. + */ + createTime?: string; + /** + * Output only. The unique identifier of the Google account of the customer. + */ + customerId?: string; + /** + * Output only. The email of the user that provided the feedback. + */ + email?: string; + /** + * Output only. A unique identifier for the feedback. When creating a new + * feedback the system will assign one. + */ + feedbackId?: string; + /** + * Required. The type of the feedback. + */ + type?: string; + } + /** + * Attachment with application-specific information about an alert. + */ + export interface Schema$Attachment { + /** + * CSV file attachment. + */ + csv?: Schema$Csv; + } + /** + * Alert for setting the domain or ip that malicious email comes from as + * whitelisted domain or ip in Gmail advanced settings. + */ + export interface Schema$BadWhitelist { + /** + * Domain id. + */ + domainId?: Schema$DomainId; + /** + * Entity whose actions triggered a Gmail phishing alert. + */ + maliciousEntity?: Schema$MaliciousEntity; + /** + * Every alert could contain multiple messages. + */ + messages?: Schema$GmailMessageInfo[]; + /** + * The source ip address of the malicious email. e.g. "127.0.0.1". + */ + sourceIp?: string; + } + /** + * Representation of a CSV file attachment, as a list of column headers and a + * list of data rows. + */ + export interface Schema$Csv { + /** + * List of data rows in a CSV file, as string arrays rather than as a single + * comma-separated string. + */ + dataRows?: Schema$CsvRow[]; + /** + * List of headers for data columns in a CSV file. + */ + headers?: string[]; + } + /** + * Representation of a single data row in a CSV file. + */ + export interface Schema$CsvRow { + /** + * Data entries in a CSV file row, as a string array rather than a single + * comma-separated string. + */ + entries?: string[]; + } + /** + * A mobile device compromised alert. Derived from audit logs. + */ + export interface Schema$DeviceCompromised { + /** + * The email of the user this alert was created for. + */ + email?: string; + /** + * Required. List of security events. + */ + events?: Schema$DeviceCompromisedSecurityDetail[]; + } + /** + * Detailed information of a single MDM device compromised event. + */ + export interface Schema$DeviceCompromisedSecurityDetail { + /** + * Device compromised state includes: "Compromised" and "Not + * Compromised". + */ + deviceCompromisedState?: string; + /** + * Required. Device Info. + */ + deviceId?: string; + /** + * The model of the device. + */ + deviceModel?: string; + /** + * The type of the device. + */ + deviceType?: string; + /** + * Required for IOS, empty for others. + */ + iosVendorId?: string; + /** + * The device resource id. + */ + resourceId?: string; + /** + * The serial number of the device. + */ + serialNumber?: string; + } + /** + * Domain id of Gmail phishing alerts. + */ + export interface Schema$DomainId { + /** + * The primary domain for the customer. + */ + customerPrimaryDomain?: string; + } + /** + * A takeout operation for the entire domain was initiated by an admin. + * Derived from audit logs. + */ + export interface Schema$DomainWideTakeoutInitiated { + /** + * Email of the admin who initiated the takeout. + */ + email?: string; + /** + * takeout request id. + */ + takeoutRequestId?: string; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} + /** + * Details of a message in phishing spike alert. + */ + export interface Schema$GmailMessageInfo { + /** + * SHA256 Hash of email's attachment and all MIME parts. + */ + attachmentsSha256Hash?: string[]; + /** + * The date the malicious email was sent. + */ + date?: string; + /** + * Hash of message body text. + */ + md5HashMessageBody?: string; + /** + * MD5 Hash of email's subject. (Only available for reported emails). + */ + md5HashSubject?: string; + /** + * Snippet of the message body text. (Only available for reported emails) + */ + messageBodySnippet?: string; + /** + * Message id. + */ + messageId?: string; + /** + * Recipient of this email. + */ + recipient?: string; + /** + * Email subject text. (Only available for reported emails). + */ + subjectText?: string; + } + /** + * An incident reported by Google Operations for a G Suite application. + */ + export interface Schema$GoogleOperations { + /** + * List of emails which correspond to the users directly affected by the + * incident. + */ + affectedUserEmails?: string[]; + /** + * Optional application-specific data for an incident, provided when the G + * Suite application which reported the incident cannot be completely + * restored to a valid state. + */ + attachmentData?: Schema$Attachment; + /** + * Detailed, freeform incident description. + */ + description?: string; + /** + * One-line incident description. + */ + title?: string; + } + /** + * Response message for an alert feedback listing request. + */ + export interface Schema$ListAlertFeedbackResponse { + /** + * The list of alert feedback. Result is ordered descending by creation + * time. + */ + feedback?: Schema$AlertFeedback[]; + } + /** + * Response message for an alert listing request. + */ + export interface Schema$ListAlertsResponse { + /** + * The list of alerts. + */ + alerts?: Schema$Alert[]; + /** + * If not empty, indicates that there may be more alerts that match the + * request; this value can be passed in a new ListAlertsRequest to get the + * next page of values. + */ + nextPageToken?: string; + } + /** + * Details of the login action + */ + export interface Schema$LoginDetails { + /** + * Required. Human readable IP address (e.g., 11.22.33.44) that is + * associated with the warning event. + */ + ipAddress?: string; + /** + * Required. Login time that is associated with the warning event. + */ + loginTime?: string; + } + /** + * Proto for all phishing alerts with common payload. Supported types are any + * of the following: User reported phishing User reported spam spike + * Suspicious message reported Phishing reclassification Malware + * reclassification + */ + export interface Schema$MailPhishing { + /** + * Domain id. + */ + domainId?: Schema$DomainId; + /** + * If true, the email is originated from within the organization. + */ + isInternal?: boolean; + /** + * Entity whose actions triggered a Gmail phishing alert. + */ + maliciousEntity?: Schema$MaliciousEntity; + /** + * Every alert could contain multiple messages. + */ + messages?: Schema$GmailMessageInfo[]; + } + /** + * Entity whose actions triggered a Gmail phishing alert. + */ + export interface Schema$MaliciousEntity { + /** + * Sender email address. + */ + fromHeader?: string; + } + /** + * Alert for a spike in user reported phishing. This will be deprecated in + * favor of MailPhishing. + */ + export interface Schema$PhishingSpike { + /** + * Domain id. + */ + domainId?: Schema$DomainId; + /** + * If true, the email is originated from within the organization. + */ + isInternal?: boolean; + /** + * Entity whose actions triggered a Gmail phishing alert. + */ + maliciousEntity?: Schema$MaliciousEntity; + /** + * Every alert could contain multiple messages. + */ + messages?: Schema$GmailMessageInfo[]; + } + /** + * A state sponsored attack alert. Derived from audit logs. + */ + export interface Schema$StateSponsoredAttack { + /** + * The email of the user this incident was created for. + */ + email?: string; + } + /** + * A mobile suspicious activity alert. Derived from audit logs. + */ + export interface Schema$SuspiciousActivity { + /** + * The email of the user this alert was created for. + */ + email?: string; + /** + * Required. List of security events. + */ + events?: Schema$SuspiciousActivitySecurityDetail[]; + } + /** + * Detailed information of a single MDM suspicious activity event. + */ + export interface Schema$SuspiciousActivitySecurityDetail { + /** + * Required. Device Info. + */ + deviceId?: string; + /** + * The model of the device. + */ + deviceModel?: string; + /** + * Device property which is changed. + */ + deviceProperty?: string; + /** + * The type of the device. + */ + deviceType?: string; + /** + * Required for IOS, empty for others. + */ + iosVendorId?: string; + /** + * New value of the device property after change. + */ + newValue?: string; + /** + * Old value of the device property before change. + */ + oldValue?: string; + /** + * The device resource id. + */ + resourceId?: string; + /** + * The serial number of the device. + */ + serialNumber?: string; + } + + + export class Resource$Alerts { + root: Alertcenter; + feedback: Resource$Alerts$Feedback; + constructor(root: Alertcenter) { + this.root = root; + this.getRoot.bind(this); + this.feedback = new Resource$Alerts$Feedback(root); + } + + getRoot() { + return this.root; + } + + + /** + * alertcenter.alerts.delete + * @desc Marks the specified alert for deletion. An alert that has been + * marked for deletion will be excluded from the results of a List operation + * by default, and will be removed from the Alert Center after 30 days. + * Marking an alert for deletion will have no effect on an alert which has + * already been marked for deletion. Attempting to mark a nonexistent alert + * for deletion will return NOT_FOUND. + * @alias alertcenter.alerts.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.alertId Required. The identifier of the alert to delete. + * @param {string=} params.customerId Optional. The unique identifier of the Google account of the customer the alert is associated with. This is obfuscated and not the plain customer ID as stored internally. Inferred from the caller identity if not provided. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete(params?: Params$Resource$Alerts$Delete, options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Alerts$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Alerts$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Alerts$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Alerts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Alerts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/alerts/{alertId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['alertId'], + pathParams: ['alertId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * alertcenter.alerts.get + * @desc Gets the specified alert. + * @alias alertcenter.alerts.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.alertId Required. The identifier of the alert to retrieve. + * @param {string=} params.customerId Optional. The unique identifier of the Google account of the customer the alert is associated with. This is obfuscated and not the plain customer ID as stored internally. Inferred from the caller identity if not provided. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Alerts$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Alerts$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Alerts$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Alerts$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Alerts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Alerts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/alerts/{alertId}') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['alertId'], + pathParams: ['alertId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * alertcenter.alerts.list + * @desc Lists all the alerts for the current user and application. + * @alias alertcenter.alerts.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.customerId Optional. The unique identifier of the Google account of the customer the alerts are associated with. This is obfuscated and not the plain customer ID as stored internally. Inferred from the caller identity if not provided. + * @param {string=} params.filter Optional. Query string for filtering alert results. This string must be specified as an expression or list of expressions, using the following grammar: ### Expressions An expression has the general form ` `. A field or value which contains a space or a colon must be enclosed by double quotes. #### Operators Operators follow the BNF specification: ` ::= "=" | ":"` ` ::= "<" | ">" | "<=" | ">="` Relational operators are defined only for timestamp fields. Equality operators are defined only for string fields. #### Timestamp fields The value supplied for a timestamp field must be an [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time string. Supported timestamp fields are `create_time`, `start_time`, and `end_time`. #### String fields The value supplied for a string field may be an arbitrary string. #### Examples To query for all alerts created on or after April 5, 2018: `create_time >= "2018-04-05T00:00:00Z"` To query for all alerts from the source "Gmail phishing": `source:"Gmail phishing"` ### Joining expressions Expressions may be joined to form a more complex query. The BNF specification is: ` ::= | | ` ` ::= "AND" | "OR" | ""` ` ::= "NOT"` Using the empty string as a conjunction acts as an implicit AND. The precedence of joining operations, from highest to lowest, is NOT, AND, OR. #### Examples To query for all alerts which started in 2017: `start_time >= "2017-01-01T00:00:00Z" AND start_time < "2018-01-01T00:00:00Z"` To query for all user reported phishing alerts from the source "Gmail phishing": `type:"User reported phishing" source:"Gmail phishing"` + * @param {string=} params.orderBy Optional. Sort the list results by a certain order. If not specified results may be returned in arbitrary order. You can sort the results in a descending order based on the creation timestamp using order_by="create_time desc". Currently, only sorting by create_time desc is supported. + * @param {integer=} params.pageSize Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. + * @param {string=} params.pageToken Optional. A token identifying a page of results the server should return. If empty, a new iteration is started. To continue an iteration, pass in the value from the previous ListAlertsResponse's next_page_token field. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Alerts$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Alerts$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Alerts$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Alerts$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Alerts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Alerts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/alerts').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: [], + pathParams: [], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Alerts$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The identifier of the alert to delete. + */ + alertId?: string; + /** + * Optional. The unique identifier of the Google account of the customer the + * alert is associated with. This is obfuscated and not the plain customer + * ID as stored internally. Inferred from the caller identity if not + * provided. + */ + customerId?: string; + } + export interface Params$Resource$Alerts$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The identifier of the alert to retrieve. + */ + alertId?: string; + /** + * Optional. The unique identifier of the Google account of the customer the + * alert is associated with. This is obfuscated and not the plain customer + * ID as stored internally. Inferred from the caller identity if not + * provided. + */ + customerId?: string; + } + export interface Params$Resource$Alerts$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The unique identifier of the Google account of the customer the + * alerts are associated with. This is obfuscated and not the plain customer + * ID as stored internally. Inferred from the caller identity if not + * provided. + */ + customerId?: string; + /** + * Optional. Query string for filtering alert results. This string must be + * specified as an expression or list of expressions, using the following + * grammar: ### Expressions An expression has the general form ` + * `. A field or value which contains a space or a colon + * must be enclosed by double quotes. #### Operators Operators follow the + * BNF specification: ` ::= "=" | ":"` + * ` ::= "<" | ">" | "<=" | ">="` Relational operators + * are defined only for timestamp fields. Equality operators are defined + * only for string fields. #### Timestamp fields The value supplied for a + * timestamp field must be an [RFC + * 3339](https://tools.ietf.org/html/rfc3339) date-time string. Supported + * timestamp fields are `create_time`, `start_time`, and `end_time`. #### + * String fields The value supplied for a string field may be an arbitrary + * string. #### Examples To query for all alerts created on or after April + * 5, 2018: `create_time >= "2018-04-05T00:00:00Z"` To query for all + * alerts from the source "Gmail phishing": `source:"Gmail phishing"` ### + * Joining expressions Expressions may be joined to form a more complex + * query. The BNF specification is: ` ::= | + * | + * ` ` ::= "AND" | "OR" | ""` ` ::= + * "NOT"` Using the empty string as a conjunction acts as an implicit AND. + * The precedence of joining operations, from highest to lowest, is NOT, + * AND, OR. #### Examples To query for all alerts which started in 2017: + * `start_time >= "2017-01-01T00:00:00Z" AND start_time < + * "2018-01-01T00:00:00Z"` To query for all user reported phishing alerts + * from the source "Gmail phishing": `type:"User reported phishing" + * source:"Gmail phishing"` + */ + filter?: string; + /** + * Optional. Sort the list results by a certain order. If not specified + * results may be returned in arbitrary order. You can sort the results in a + * descending order based on the creation timestamp using + * order_by="create_time desc". Currently, only sorting by create_time desc + * is supported. + */ + orderBy?: string; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + pageSize?: number; + /** + * Optional. A token identifying a page of results the server should return. + * If empty, a new iteration is started. To continue an iteration, pass in + * the value from the previous ListAlertsResponse's next_page_token field. + */ + pageToken?: string; + } + + export class Resource$Alerts$Feedback { + root: Alertcenter; + constructor(root: Alertcenter) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * alertcenter.alerts.feedback.create + * @desc Creates a new alert feedback. + * @alias alertcenter.alerts.feedback.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.alertId Required. The identifier of the alert this feedback belongs to. Returns a NOT_FOUND error if no such alert. + * @param {string=} params.customerId Optional. The unique identifier of the Google account of the customer the alert's feedback is associated with. This is obfuscated and not the plain customer ID as stored internally. Inferred from the caller identity if not provided. + * @param {().AlertFeedback} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Alerts$Feedback$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Alerts$Feedback$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Alerts$Feedback$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Alerts$Feedback$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Alerts$Feedback$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Alerts$Feedback$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/alerts/{alertId}/feedback') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['alertId'], + pathParams: ['alertId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * alertcenter.alerts.feedback.list + * @desc Lists all the feedback for an alert. + * @alias alertcenter.alerts.feedback.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.alertId Required. The alert identifier. If the alert does not exist returns a NOT_FOUND error. + * @param {string=} params.customerId Optional. The unique identifier of the Google account of the customer the alert is associated with. This is obfuscated and not the plain customer ID as stored internally. Inferred from the caller identity if not provided. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Alerts$Feedback$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Alerts$Feedback$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Alerts$Feedback$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): + void; + list( + paramsOrCallback?: Params$Resource$Alerts$Feedback$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Alerts$Feedback$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Alerts$Feedback$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://alertcenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/alerts/{alertId}/feedback') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['alertId'], + pathParams: ['alertId'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Alerts$Feedback$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The identifier of the alert this feedback belongs to. Returns a + * NOT_FOUND error if no such alert. + */ + alertId?: string; + /** + * Optional. The unique identifier of the Google account of the customer the + * alert's feedback is associated with. This is obfuscated and not the plain + * customer ID as stored internally. Inferred from the caller identity if + * not provided. + */ + customerId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AlertFeedback; + } + export interface Params$Resource$Alerts$Feedback$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The alert identifier. If the alert does not exist returns a + * NOT_FOUND error. + */ + alertId?: string; + /** + * Optional. The unique identifier of the Google account of the customer the + * alert is associated with. This is obfuscated and not the plain customer + * ID as stored internally. Inferred from the caller identity if not + * provided. + */ + customerId?: string; + } +} diff --git a/src/apis/androiddeviceprovisioning/v1.ts b/src/apis/androiddeviceprovisioning/v1.ts index b880e2915ff..ddcea1a683c 100644 --- a/src/apis/androiddeviceprovisioning/v1.ts +++ b/src/apis/androiddeviceprovisioning/v1.ts @@ -540,6 +540,10 @@ export namespace androiddeviceprovisioning_v1 { * results are available. */ nextPageToken?: string; + /** + * The total count of items in the list irrespective of pagination. + */ + totalSize?: number; } /** * Request to find devices by customers. @@ -576,6 +580,10 @@ export namespace androiddeviceprovisioning_v1 { * results are available. */ nextPageToken?: string; + /** + * The total count of items in the list irrespective of pagination. + */ + totalSize?: number; } /** * Response message of all customers related to this partner. @@ -585,6 +593,15 @@ export namespace androiddeviceprovisioning_v1 { * List of customers related to this reseller partner. */ customers?: Schema$Company[]; + /** + * A token to retrieve the next page of results. Omitted if no further + * results are available. + */ + nextPageToken?: string; + /** + * The total count of items in the list irrespective of pagination. + */ + totalSize?: number; } /** * Response message to list customers of the vendor. @@ -599,6 +616,10 @@ export namespace androiddeviceprovisioning_v1 { * results are available. */ nextPageToken?: string; + /** + * The total count of items in the list irrespective of pagination. + */ + totalSize?: number; } /** * Response message to list vendors of the partner. @@ -609,6 +630,10 @@ export namespace androiddeviceprovisioning_v1 { * results are available. */ nextPageToken?: string; + /** + * The total count of items in the list irrespective of pagination. + */ + totalSize?: number; /** * List of vendors of the reseller partner. Fields `name`, `companyId` and * `companyName` are populated to the Company object. @@ -2139,6 +2164,8 @@ export namespace androiddeviceprovisioning_v1 { * @memberOf! () * * @param {object} params Parameters for request + * @param {integer=} params.pageSize The maximum number of results to be returned. If not specified or 0, all the records are returned. + * @param {string=} params.pageToken A token identifying a page of results returned by the server. * @param {string} params.partnerId Required. The ID of the reseller partner. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2224,6 +2251,15 @@ export namespace androiddeviceprovisioning_v1 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * The maximum number of results to be returned. If not specified or 0, all + * the records are returned. + */ + pageSize?: number; + /** + * A token identifying a page of results returned by the server. + */ + pageToken?: string; /** * Required. The ID of the reseller partner. */ diff --git a/src/apis/androidenterprise/v1.ts b/src/apis/androidenterprise/v1.ts index 0b1c241d817..15bc6297451 100644 --- a/src/apis/androidenterprise/v1.ts +++ b/src/apis/androidenterprise/v1.ts @@ -136,11 +136,7 @@ export namespace androidenterprise_v1 { */ parent?: string; /** - * The list of permissions the admin is granted within the iframe. The admin - * will only be allowed to view an iframe if they have all of the - * permissions associated with it. The only valid value is - * "approveApps" that will allow the admin to access the iframe in - * "approve" mode. + * Deprecated. Use PlaySearch.approveApps. */ permission?: string[]; /** @@ -161,6 +157,10 @@ export namespace androidenterprise_v1 { webApps?: Schema$AdministratorWebTokenSpecWebApps; } export interface Schema$AdministratorWebTokenSpecPlaySearch { + /** + * Allow access to the iframe in approve mode. Default is false. + */ + approveApps?: boolean; /** * Whether the Play Search page is displayed. Default is true. */ diff --git a/src/apis/androidpublisher/README.md b/src/apis/androidpublisher/README.md index c06ebcf28fb..d139bdbf59d 100644 --- a/src/apis/androidpublisher/README.md +++ b/src/apis/androidpublisher/README.md @@ -2,7 +2,7 @@ # @google/androidpublisher -> Lets Android application developers access their Google Play accounts. +> Accesses Android application developers' Google Play accounts. ## Installation diff --git a/src/apis/androidpublisher/v1.1.ts b/src/apis/androidpublisher/v1.1.ts index f0f68b1d487..6866a7220ca 100644 --- a/src/apis/androidpublisher/v1.1.ts +++ b/src/apis/androidpublisher/v1.1.ts @@ -32,7 +32,7 @@ export namespace androidpublisher_v1_1 { /** * Google Play Developer API * - * Lets Android application developers access their Google Play accounts. + * Accesses Android application developers' Google Play accounts. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/androidpublisher/v1.ts b/src/apis/androidpublisher/v1.ts index cacd61d47e8..1a382863de6 100644 --- a/src/apis/androidpublisher/v1.ts +++ b/src/apis/androidpublisher/v1.ts @@ -32,7 +32,7 @@ export namespace androidpublisher_v1 { /** * Google Play Developer API * - * Lets Android application developers access their Google Play accounts. + * Accesses Android application developers' Google Play accounts. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/androidpublisher/v2.ts b/src/apis/androidpublisher/v2.ts index a0a810e204c..04464ef5cff 100644 --- a/src/apis/androidpublisher/v2.ts +++ b/src/apis/androidpublisher/v2.ts @@ -32,7 +32,7 @@ export namespace androidpublisher_v2 { /** * Google Play Developer API * - * Lets Android application developers access their Google Play accounts. + * Accesses Android application developers' Google Play accounts. * * @example * const {google} = require('googleapis'); @@ -2415,6 +2415,7 @@ export namespace androidpublisher_v2 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.ackBundleInstallationWarning Must be set to true if the bundle installation may trigger a warning on user devices (for example, if installation size may be over a threshold, typically 100 MB). * @param {string} params.editId Unique identifier for this edit. * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". * @param {object} params.media Media object @@ -2506,6 +2507,12 @@ export namespace androidpublisher_v2 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Must be set to true if the bundle installation may trigger a warning on + * user devices (for example, if installation size may be over a threshold, + * typically 100 MB). + */ + ackBundleInstallationWarning?: boolean; /** * Unique identifier for this edit. */ diff --git a/src/apis/androidpublisher/v3.ts b/src/apis/androidpublisher/v3.ts index 95030596f13..2adb9b5d02c 100644 --- a/src/apis/androidpublisher/v3.ts +++ b/src/apis/androidpublisher/v3.ts @@ -32,7 +32,7 @@ export namespace androidpublisher_v3 { /** * Google Play Developer API * - * Lets Android application developers access their Google Play accounts. + * Accesses Android application developers' Google Play accounts. * * @example * const {google} = require('googleapis'); @@ -1828,6 +1828,7 @@ export namespace androidpublisher_v3 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.ackBundleInstallationWarning Must be set to true if the bundle installation may trigger a warning on user devices (for example, if installation size may be over a threshold, typically 100 MB). * @param {string} params.editId Unique identifier for this edit. * @param {string} params.packageName Unique identifier for the Android app that is being updated; for example, "com.spiffygame". * @param {object} params.media Media object @@ -1919,6 +1920,12 @@ export namespace androidpublisher_v3 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Must be set to true if the bundle installation may trigger a warning on + * user devices (for example, if installation size may be over a threshold, + * typically 100 MB). + */ + ackBundleInstallationWarning?: boolean; /** * Unique identifier for this edit. */ diff --git a/src/apis/appengine/v1.ts b/src/apis/appengine/v1.ts index 98dd998805c..c58ec14c668 100644 --- a/src/apis/appengine/v1.ts +++ b/src/apis/appengine/v1.ts @@ -135,7 +135,7 @@ export namespace appengine_v1 { /** * HTTP path dispatch rules for requests to the application that do not * explicitly target a service or version. Rules are order-dependent. Up to - * 20 dispatch rules can be supported.@OutputOnly + * 20 dispatch rules can be supported. */ dispatchRules?: Schema$UrlDispatchRule[]; /** @@ -577,6 +577,11 @@ export namespace appengine_v1 { * case, config_id must be omitted. */ configId?: string; + /** + * Enable or disable trace sampling. By default, this is set to false for + * enabled. + */ + disableTraceSampling?: boolean; /** * Endpoints service name which is the name of the "service" * resource in the Service Management API. For example diff --git a/src/apis/appengine/v1beta.ts b/src/apis/appengine/v1beta.ts index dfb57b97025..501ec4068d5 100644 --- a/src/apis/appengine/v1beta.ts +++ b/src/apis/appengine/v1beta.ts @@ -135,7 +135,7 @@ export namespace appengine_v1beta { /** * HTTP path dispatch rules for requests to the application that do not * explicitly target a service or version. Rules are order-dependent. Up to - * 20 dispatch rules can be supported.@OutputOnly + * 20 dispatch rules can be supported. */ dispatchRules?: Schema$UrlDispatchRule[]; /** diff --git a/src/apis/bigquerydatatransfer/v1.ts b/src/apis/bigquerydatatransfer/v1.ts index ddac97fbe29..d905633b90c 100644 --- a/src/apis/bigquerydatatransfer/v1.ts +++ b/src/apis/bigquerydatatransfer/v1.ts @@ -469,9 +469,12 @@ export namespace bigquerydatatransfer_v1 { displayName?: string; /** * The resource name of the transfer config. Transfer config names have the - * form `projects/{project_id}/transferConfigs/{config_id}`. Where - * `config_id` is usually a uuid, even though it is not guaranteed or - * required. The name is ignored when creating a transfer config. + * form of + * `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. + * The name is automatically generated based on the config_id specified in + * CreateTransferConfigRequest along with project_id and region. If + * config_id is not provided, usually a uuid, even though it is not + * guaranteed or required, will be generated for config_id. */ name?: string; /** @@ -1667,7 +1670,7 @@ export namespace bigquerydatatransfer_v1 { * * @param {object} params Parameters for request * @param {string=} params.authorizationCode Optional OAuth2 authorization code to use with this transfer configuration. If it is provided, the transfer configuration will be associated with the authorizing user. In order to obtain authorization_code, please make a request to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for the given data source returned by ListDataSources method. * data_source_scopes are the scopes returned by ListDataSources method. * redirect_uri is an optional parameter. If not specified, then authorization code is posted to the opener of authorization flow window. Otherwise it will be sent to the redirect uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization code should be returned in the title bar of the browser, with the page text prompting the user to copy the code and paste it in the application. - * @param {string} params.name The resource name of the transfer config. Transfer config names have the form `projects/{project_id}/transferConfigs/{config_id}`. Where `config_id` is usually a uuid, even though it is not guaranteed or required. The name is ignored when creating a transfer config. + * @param {string} params.name The resource name of the transfer config. Transfer config names have the form of `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. The name is automatically generated based on the config_id specified in CreateTransferConfigRequest along with project_id and region. If config_id is not provided, usually a uuid, even though it is not guaranteed or required, will be generated for config_id. * @param {string=} params.updateMask Required list of fields to be updated in this request. * @param {().TransferConfig} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -1928,9 +1931,12 @@ export namespace bigquerydatatransfer_v1 { authorizationCode?: string; /** * The resource name of the transfer config. Transfer config names have the - * form `projects/{project_id}/transferConfigs/{config_id}`. Where - * `config_id` is usually a uuid, even though it is not guaranteed or - * required. The name is ignored when creating a transfer config. + * form of + * `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. + * The name is automatically generated based on the config_id specified in + * CreateTransferConfigRequest along with project_id and region. If + * config_id is not provided, usually a uuid, even though it is not + * guaranteed or required, will be generated for config_id. */ name?: string; /** @@ -2664,7 +2670,7 @@ export namespace bigquerydatatransfer_v1 { * * @param {object} params Parameters for request * @param {string=} params.authorizationCode Optional OAuth2 authorization code to use with this transfer configuration. If it is provided, the transfer configuration will be associated with the authorizing user. In order to obtain authorization_code, please make a request to https://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=&scope=&redirect_uri= * client_id should be OAuth client_id of BigQuery DTS API for the given data source returned by ListDataSources method. * data_source_scopes are the scopes returned by ListDataSources method. * redirect_uri is an optional parameter. If not specified, then authorization code is posted to the opener of authorization flow window. Otherwise it will be sent to the redirect uri. A special value of urn:ietf:wg:oauth:2.0:oob means that authorization code should be returned in the title bar of the browser, with the page text prompting the user to copy the code and paste it in the application. - * @param {string} params.name The resource name of the transfer config. Transfer config names have the form `projects/{project_id}/transferConfigs/{config_id}`. Where `config_id` is usually a uuid, even though it is not guaranteed or required. The name is ignored when creating a transfer config. + * @param {string} params.name The resource name of the transfer config. Transfer config names have the form of `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. The name is automatically generated based on the config_id specified in CreateTransferConfigRequest along with project_id and region. If config_id is not provided, usually a uuid, even though it is not guaranteed or required, will be generated for config_id. * @param {string=} params.updateMask Required list of fields to be updated in this request. * @param {().TransferConfig} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -2921,9 +2927,12 @@ export namespace bigquerydatatransfer_v1 { authorizationCode?: string; /** * The resource name of the transfer config. Transfer config names have the - * form `projects/{project_id}/transferConfigs/{config_id}`. Where - * `config_id` is usually a uuid, even though it is not guaranteed or - * required. The name is ignored when creating a transfer config. + * form of + * `projects/{project_id}/location/{region}/transferConfigs/{config_id}`. + * The name is automatically generated based on the config_id specified in + * CreateTransferConfigRequest along with project_id and region. If + * config_id is not provided, usually a uuid, even though it is not + * guaranteed or required, will be generated for config_id. */ name?: string; /** diff --git a/src/apis/calendar/v3.ts b/src/apis/calendar/v3.ts index a172240acab..3ec4c25a741 100644 --- a/src/apis/calendar/v3.ts +++ b/src/apis/calendar/v3.ts @@ -3225,7 +3225,8 @@ export namespace calendar_v3 { * @param {object} params Parameters for request * @param {string} params.calendarId Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. * @param {string} params.eventId Event identifier. - * @param {boolean=} params.sendNotifications Whether to send notifications about the deletion of the event. Optional. The default is False. + * @param {boolean=} params.sendNotifications Deprecated. Please use sendUpdates instead. Whether to send notifications about the deletion of the event. Note that some emails might still be sent even if you set the value to false. The default is false. + * @param {string=} params.sendUpdates Guests who should receive notifications about the deletion of the event. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -3398,7 +3399,8 @@ import(paramsOrCallback?: Params$Resource$Events$Import|BodyResponseCallback + +# @google/cloudasset + +> The cloud asset API manages the history and inventory of cloud resources. + +## Installation + +```sh +$ npm install @google/cloudasset +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/cloudasset/index.ts b/src/apis/cloudasset/index.ts new file mode 100644 index 00000000000..0bdef307c7a --- /dev/null +++ b/src/apis/cloudasset/index.ts @@ -0,0 +1,30 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {cloudasset_v1beta1} from './v1beta1'; + +export const VERSIONS = { + 'v1beta1': cloudasset_v1beta1.Cloudasset, +}; + +export function cloudasset(version: 'v1beta1'): cloudasset_v1beta1.Cloudasset; +export function cloudasset(options: cloudasset_v1beta1.Options): + cloudasset_v1beta1.Cloudasset; +export function cloudasset( + this: GoogleConfigurable, + versionOrOptions: 'v1beta1'|cloudasset_v1beta1.Options) { + return getAPI('cloudasset', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/cloudasset/package.json b/src/apis/cloudasset/package.json new file mode 100644 index 00000000000..d6a66cc720b --- /dev/null +++ b/src/apis/cloudasset/package.json @@ -0,0 +1,24 @@ +{ + "name": "@google/cloudasset", + "version": "0.1.0", + "description": "cloudasset", + "main": "index.js", + "types": "index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "dependencies": { + "googleapis-common": "^0.2.0" + } +} diff --git a/src/apis/cloudasset/v1beta1.ts b/src/apis/cloudasset/v1beta1.ts new file mode 100644 index 00000000000..c275d969901 --- /dev/null +++ b/src/apis/cloudasset/v1beta1.ts @@ -0,0 +1,1117 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace cloudasset_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + /** + * Cloud Asset API + * + * The cloud asset API manages the history and inventory of cloud resources. + * + * @example + * const {google} = require('googleapis'); + * const cloudasset = google.cloudasset('v1beta1'); + * + * @namespace cloudasset + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for Cloudasset + */ + export class Cloudasset { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + organizations: Resource$Organizations; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.organizations = new Resource$Organizations(this); + this.projects = new Resource$Projects(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Cloud asset. This includes all Google Cloud Platform resources, Cloud IAM + * policies, and other non-GCP assets. + */ + export interface Schema$Asset { + /** + * Type of the asset. Example: "google.compute.disk". + */ + assetType?: string; + /** + * Representation of the actual Cloud IAM policy set on a cloud resource. + * For each resource, there must be at most one Cloud IAM policy set on it. + */ + iamPolicy?: Schema$Policy; + /** + * The full name of the asset. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + */ + name?: string; + /** + * Representation of the resource. + */ + resource?: Schema$Resource; + } + /** + * Specifies the audit configuration for a service. The configuration + * determines which permission types are logged, and what identities, if any, + * are exempted from logging. An AuditConfig must have one or more + * AuditLogConfigs. If there are AuditConfigs for both `allServices` and a + * specific service, the union of the two AuditConfigs is used for that + * service: the log_types specified in each AuditConfig are enabled, and the + * exempted_members in each AuditLogConfig are exempted. Example Policy with + * multiple AuditConfigs: { "audit_configs": [ { + * "service": "allServices" "audit_log_configs": + * [ { "log_type": "DATA_READ", + * "exempted_members": [ "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", }, { + * "log_type": "ADMIN_READ", } ] }, + * { "service": "fooservice.googleapis.com" + * "audit_log_configs": [ { "log_type": + * "DATA_READ", }, { "log_type": + * "DATA_WRITE", "exempted_members": [ + * "user:bar@gmail.com" ] } ] } + * ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and + * ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, + * and bar@gmail.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * 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; + } + /** + * Provides the configuration for logging a type of permissions. Example: { + * "audit_log_configs": [ { "log_type": + * "DATA_READ", "exempted_members": [ + * "user:foo@gmail.com" ] }, { + * "log_type": "DATA_WRITE", } ] } This + * enables 'DATA_READ' and 'DATA_WRITE' logging, while + * exempting foo@gmail.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of + * permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[]; + /** + * The log type that this config enables. + */ + logType?: string; + } + /** + * Batch get assets history response. + */ + export interface Schema$BatchGetAssetsHistoryResponse { + /** + * A list of assets with valid time windows. + */ + assets?: Schema$TemporalAsset[]; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * Unimplemented. 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. + */ + condition?: Schema$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. * `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` . + * * `serviceAccount:{emailid}`: An email address that represents a service + * account. For example, `my-other-app@appspot.gserviceaccount.com`. * + * `group:{emailid}`: An email address that represents a Google group. For + * example, `admins@example.com`. * `domain:{domain}`: A Google Apps + * domain name that represents all the users of that domain. For example, + * `google.com` or `example.com`. + */ + members?: string[]; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, + * `roles/editor`, or `roles/owner`. + */ + role?: string; + } + /** + * Export asset request. + */ + export interface Schema$ExportAssetsRequest { + /** + * A list of asset types of which to take a snapshot for. For example: + * "google.compute.disk". If specified, only matching assets will + * be returned. + */ + assetTypes?: string[]; + /** + * Asset content type. If not specified, no content but the asset name will + * be returned. + */ + contentType?: string; + /** + * Required. Output configuration indicating where the results will be + * output to. All results will be in newline delimited JSON format. + */ + outputConfig?: Schema$OutputConfig; + /** + * Timestamp to take an asset snapshot. This can only be set to a timestamp + * in the past or of the current time. If not specified, the current time + * will be used. Due to delays in resource data collection and indexing, + * there is a volatile window during which running the same query may get + * different results. + */ + readTime?: string; + } + /** + * Represents an expression text. Example: title: "User account + * presence" description: "Determines whether the request has a + * user account" expression: "size(request.user) > 0" + */ + export interface Schema$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. + */ + 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. + */ + 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. + */ + 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. + */ + title?: string; + } + /** + * A Cloud Storage location. + */ + export interface Schema$GcsDestination { + /** + * The path of the Cloud Storage objects. It's the same path that is + * used by gsutil. For example: "gs://bucket_name/object_path". + * See [Viewing and Editing Object + * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + * for more information. + */ + uri?: string; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: any; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: any; + } + /** + * Output configuration for export assets destination. + */ + export interface Schema$OutputConfig { + /** + * Destination on Cloud Storage. + */ + gcsDestination?: Schema$GcsDestination; + } + /** + * Defines an Identity and Access Management (IAM) policy. It is used to + * specify access control policies for Cloud Platform resources. A `Policy` + * consists of a list of `bindings`. A `binding` binds a list of `members` to + * a `role`, where the members can be user accounts, Google groups, Google + * domains, and service accounts. A `role` is a named list of permissions + * defined by IAM. **JSON Example** { "bindings": [ { + * "role": "roles/owner", "members": [ + * "user:mike@example.com", "group:admins@example.com", + * "domain:google.com", + * "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { + * "role": "roles/viewer", "members": + * ["user:sean@example.com"] } ] } **YAML + * Example** bindings: - members: - user:mike@example.com - + * group:admins@example.com - domain:google.com - + * serviceAccount:my-other-app@appspot.gserviceaccount.com role: + * roles/owner - members: - user:sean@example.com role: + * roles/viewer For a description of IAM and its features, see the [IAM + * developer's guide](https://cloud.google.com/iam/docs). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. `bindings` with no members + * will result in an error. + */ + bindings?: Schema$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. If no `etag` is provided in the call to `setIamPolicy`, then the + * existing policy is overwritten blindly. + */ + etag?: string; + /** + * Deprecated. + */ + version?: number; + } + /** + * Representation of a cloud resource. + */ + export interface Schema$Resource { + /** + * The content of the resource, in which some sensitive fields are scrubbed + * away and may not be present. + */ + data?: any; + /** + * The URL of the discovery document containing the resource's JSON + * schema. For example: + * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + * It will be left unspecified for resources without a discovery-based API, + * such as Cloud Bigtable. + */ + discoveryDocumentUri?: string; + /** + * The JSON schema name listed in the discovery document. Example: + * "Project". It will be left unspecified for resources (such as + * Cloud Bigtable) without a discovery-based API. + */ + discoveryName?: string; + /** + * The full name of the immediate parent of this resource. See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. For GCP assets, it is the parent resource defined + * in the [Cloud IAM policy + * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + * For example: + * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + * For third-party assets, it is up to the users to define. + */ + parent?: string; + /** + * The REST URL for accessing the resource. An HTTP GET operation using this + * URL returns the resource itself. Example: + * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + * It will be left unspecified for resources without a REST API. + */ + resourceUrl?: string; + /** + * The API version. Example: "v1". + */ + version?: string; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: any[]; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + /** + * Temporal asset. In addition to the asset, the temporal asset includes the + * status of the asset and valid from and to time of it. + */ + export interface Schema$TemporalAsset { + /** + * Asset. + */ + asset?: Schema$Asset; + /** + * If the asset is deleted or not. + */ + deleted?: boolean; + /** + * The time window when the asset data and state was observed. + */ + window?: Schema$TimeWindow; + } + /** + * A time window of [start_time, end_time). + */ + export interface Schema$TimeWindow { + /** + * End time of the time window (exclusive). Current timestamp if not + * specified. + */ + endTime?: string; + /** + * Start time of the time window (inclusive). + */ + startTime?: string; + } + + + export class Resource$Organizations { + root: Cloudasset; + operations: Resource$Organizations$Operations; + constructor(root: Cloudasset) { + this.root = root; + this.getRoot.bind(this); + this.operations = new Resource$Organizations$Operations(root); + } + + getRoot() { + return this.root; + } + + + /** + * cloudasset.organizations.batchGetAssetsHistory + * @desc Batch gets the update history of assets that overlap a time window. + * For RESOURCE content, this API outputs history with asset in both + * non-delete or deleted status. For IAM_POLICY content, this API outputs + * history when the asset and its attached IAM POLICY both exist. This can + * create gaps in the output history. + * @alias cloudasset.organizations.batchGetAssetsHistory + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.assetNames A list of the full names of the assets. For example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. See [Resource Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more info. The request becomes a no-op if the asset name list is empty, and the max size of the asset name list is 100 in one request. + * @param {string=} params.contentType Required. The content type. + * @param {string} params.parent Required. The relative name of the root asset. It can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345"). + * @param {string=} params.readTimeWindow.endTime End time of the time window (exclusive). Current timestamp if not specified. + * @param {string=} params.readTimeWindow.startTime Start time of the time window (inclusive). + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + batchGetAssetsHistory( + params?: Params$Resource$Organizations$Batchgetassetshistory, + options?: MethodOptions): + AxiosPromise; + batchGetAssetsHistory( + params: Params$Resource$Organizations$Batchgetassetshistory, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + batchGetAssetsHistory( + params: Params$Resource$Organizations$Batchgetassetshistory, + callback: BodyResponseCallback): + void; + batchGetAssetsHistory( + callback: BodyResponseCallback): + void; + batchGetAssetsHistory( + paramsOrCallback?: Params$Resource$Organizations$Batchgetassetshistory| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizations$Batchgetassetshistory; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Batchgetassetshistory; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}:batchGetAssetsHistory') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * cloudasset.organizations.exportAssets + * @desc Exports assets with time and resource types to a given Cloud + * Storage location. The output format is newline-delimited JSON. This API + * implements the google.longrunning.Operation API allowing you to keep + * track of the export. + * @alias cloudasset.organizations.exportAssets + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The relative name of the root asset. This can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345"). + * @param {().ExportAssetsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + exportAssets( + params?: Params$Resource$Organizations$Exportassets, + options?: MethodOptions): AxiosPromise; + exportAssets( + params: Params$Resource$Organizations$Exportassets, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + exportAssets( + params: Params$Resource$Organizations$Exportassets, + callback: BodyResponseCallback): void; + exportAssets(callback: BodyResponseCallback): void; + exportAssets( + paramsOrCallback?: Params$Resource$Organizations$Exportassets| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizations$Exportassets; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Exportassets; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}:exportAssets') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Organizations$Batchgetassetshistory { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A list of the full names of the assets. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more info. The request becomes a no-op if the asset name list is + * empty, and the max size of the asset name list is 100 in one request. + */ + assetNames?: string; + /** + * Required. The content type. + */ + contentType?: string; + /** + * Required. The relative name of the root asset. It can only be an + * organization number (such as "organizations/123"), a project ID (such as + * "projects/my-project-id")", or a project number (such as + * "projects/12345"). + */ + parent?: string; + /** + * End time of the time window (exclusive). Current timestamp if not + * specified. + */ + 'readTimeWindow.endTime'?: string; + /** + * Start time of the time window (inclusive). + */ + 'readTimeWindow.startTime'?: string; + } + export interface Params$Resource$Organizations$Exportassets { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The relative name of the root asset. This can only be an + * organization number (such as "organizations/123"), a project ID (such as + * "projects/my-project-id"), or a project number (such as + * "projects/12345"). + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ExportAssetsRequest; + } + + export class Resource$Organizations$Operations { + root: Cloudasset; + constructor(root: Cloudasset) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * cloudasset.organizations.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias cloudasset.organizations.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Organizations$Operations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Organizations$Operations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Organizations$Operations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Organizations$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Organizations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Organizations$Operations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + + + + export class Resource$Projects { + root: Cloudasset; + operations: Resource$Projects$Operations; + constructor(root: Cloudasset) { + this.root = root; + this.getRoot.bind(this); + this.operations = new Resource$Projects$Operations(root); + } + + getRoot() { + return this.root; + } + + + /** + * cloudasset.projects.batchGetAssetsHistory + * @desc Batch gets the update history of assets that overlap a time window. + * For RESOURCE content, this API outputs history with asset in both + * non-delete or deleted status. For IAM_POLICY content, this API outputs + * history when the asset and its attached IAM POLICY both exist. This can + * create gaps in the output history. + * @alias cloudasset.projects.batchGetAssetsHistory + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.assetNames A list of the full names of the assets. For example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. See [Resource Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more info. The request becomes a no-op if the asset name list is empty, and the max size of the asset name list is 100 in one request. + * @param {string=} params.contentType Required. The content type. + * @param {string} params.parent Required. The relative name of the root asset. It can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345"). + * @param {string=} params.readTimeWindow.endTime End time of the time window (exclusive). Current timestamp if not specified. + * @param {string=} params.readTimeWindow.startTime Start time of the time window (inclusive). + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + batchGetAssetsHistory( + params?: Params$Resource$Projects$Batchgetassetshistory, + options?: MethodOptions): + AxiosPromise; + batchGetAssetsHistory( + params: Params$Resource$Projects$Batchgetassetshistory, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + batchGetAssetsHistory( + params: Params$Resource$Projects$Batchgetassetshistory, + callback: BodyResponseCallback): + void; + batchGetAssetsHistory( + callback: BodyResponseCallback): + void; + batchGetAssetsHistory( + paramsOrCallback?: Params$Resource$Projects$Batchgetassetshistory| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Batchgetassetshistory; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Batchgetassetshistory; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}:batchGetAssetsHistory') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * cloudasset.projects.exportAssets + * @desc Exports assets with time and resource types to a given Cloud + * Storage location. The output format is newline-delimited JSON. This API + * implements the google.longrunning.Operation API allowing you to keep + * track of the export. + * @alias cloudasset.projects.exportAssets + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The relative name of the root asset. This can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345"). + * @param {().ExportAssetsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + exportAssets( + params?: Params$Resource$Projects$Exportassets, + options?: MethodOptions): AxiosPromise; + exportAssets( + params: Params$Resource$Projects$Exportassets, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + exportAssets( + params: Params$Resource$Projects$Exportassets, + callback: BodyResponseCallback): void; + exportAssets(callback: BodyResponseCallback): void; + exportAssets( + paramsOrCallback?: Params$Resource$Projects$Exportassets| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Exportassets; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Exportassets; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}:exportAssets') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Batchgetassetshistory { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A list of the full names of the assets. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more info. The request becomes a no-op if the asset name list is + * empty, and the max size of the asset name list is 100 in one request. + */ + assetNames?: string; + /** + * Required. The content type. + */ + contentType?: string; + /** + * Required. The relative name of the root asset. It can only be an + * organization number (such as "organizations/123"), a project ID (such as + * "projects/my-project-id")", or a project number (such as + * "projects/12345"). + */ + parent?: string; + /** + * End time of the time window (exclusive). Current timestamp if not + * specified. + */ + 'readTimeWindow.endTime'?: string; + /** + * Start time of the time window (inclusive). + */ + 'readTimeWindow.startTime'?: string; + } + export interface Params$Resource$Projects$Exportassets { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The relative name of the root asset. This can only be an + * organization number (such as "organizations/123"), a project ID (such as + * "projects/my-project-id"), or a project number (such as + * "projects/12345"). + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ExportAssetsRequest; + } + + export class Resource$Projects$Operations { + root: Cloudasset; + constructor(root: Cloudasset) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * cloudasset.projects.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias cloudasset.projects.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Operations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Projects$Operations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Projects$Operations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Projects$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Operations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } +} diff --git a/src/apis/cloudbuild/v1.ts b/src/apis/cloudbuild/v1.ts index c3d9ae67a0f..0e3df61f298 100644 --- a/src/apis/cloudbuild/v1.ts +++ b/src/apis/cloudbuild/v1.ts @@ -271,6 +271,14 @@ export namespace cloudbuild_v1 { * error. */ diskSizeGb?: string; + /** + * A list of global environment variable definitions that will exist for all + * build steps in this build. If a variable is defined in both globally and + * in a build step, the variable will use the build step value. The + * elements are of the form "KEY=VALUE" for the environment + * variable "KEY" being given the value "VALUE". + */ + env?: string[]; /** * Option to specify the logging mode, which determines where the logs are * stored. @@ -288,6 +296,13 @@ export namespace cloudbuild_v1 { * Requested verifiability options. */ requestedVerifyOption?: string; + /** + * A list of global environment variables, which are encrypted using a Cloud + * Key Management Service crypto key. These values must be specified in the + * build's `Secret`. These variables will be available to all build + * steps in this build. + */ + secretEnv?: string[]; /** * Requested hash for SourceProvenance. */ @@ -297,6 +312,15 @@ export namespace cloudbuild_v1 { * checks. */ substitutionOption?: string; + /** + * Global list of volumes to mount for ALL build steps Each volume is + * created as an empty volume prior to starting the build process. Upon + * completion of the build, volumes and their contents are discarded. Global + * volume names and paths cannot conflict with the volumes defined a build + * step. Using a global volume in a build with only one step is not valid + * as it is indicative of a build request with an incorrect configuration. + */ + volumes?: Schema$Volume[]; } /** * A step in the build pipeline. @@ -354,6 +378,11 @@ export namespace cloudbuild_v1 { * build step. */ name?: string; + /** + * Output only. Stores timing information for pulling this build step's + * builder image only. + */ + pullTiming?: Schema$TimeSpan; /** * A list of environment variables which are encrypted using a Cloud Key * Management Service crypto key. These values must be specified in the @@ -377,11 +406,11 @@ export namespace cloudbuild_v1 { */ timing?: Schema$TimeSpan; /** - * List of volumes to mount into the build step. Each volume will be - * created as an empty volume prior to execution of the build step. Upon - * completion of the build, volumes and their contents will be discarded. - * Using a named volume in only one step is not valid as it is indicative of - * a mis-configured build request. + * List of volumes to mount into the build step. Each volume is created as + * an empty volume prior to execution of the build step. Upon completion of + * the build, volumes and their contents are discarded. Using a named + * volume in only one step is not valid as it is indicative of a build + * request with an incorrect configuration. */ volumes?: Schema$Volume[]; /** @@ -665,8 +694,8 @@ export namespace cloudbuild_v1 { /** * Map of environment variable name to its encrypted value. Secret * environment variables must be unique across all of a build's secrets, - * and must be used by at least one build step. Values can be at most 1 KB - * in size. There can be at most ten secret values across all of a + * and must be used by at least one build step. Values can be at most 64 KB + * in size. There can be at most 100 secret values across all of a * build's secrets. */ secretEnv?: any; diff --git a/src/apis/cloudiot/v1.ts b/src/apis/cloudiot/v1.ts index 86fc02970ea..3747600b15e 100644 --- a/src/apis/cloudiot/v1.ts +++ b/src/apis/cloudiot/v1.ts @@ -175,6 +175,11 @@ export namespace cloudiot_v1 { * minutes. */ lastStateTime?: string; + /** + * **Beta Feature** The logging verbosity for device activity. If + * unspecified, DeviceRegistry.log_level will be used. + */ + logLevel?: string; /** * The metadata key-value pairs assigned to the device. This metadata is not * interpreted or indexed by Cloud IoT Core. It can be used to add @@ -299,6 +304,12 @@ export namespace cloudiot_v1 { * The identifier of this device registry. For example, `myRegistry`. */ id?: string; + /** + * **Beta Feature** The default logging verbosity for activity from devices + * in this registry. The verbosity level can be overridden by + * Device.log_level. + */ + logLevel?: string; /** * The MQTT configuration for this device registry. */ @@ -558,6 +569,28 @@ export namespace cloudiot_v1 { */ publicKeyCertificate?: Schema$PublicKeyCertificate; } + /** + * Request for `SendCommandToDevice`. + */ + export interface Schema$SendCommandToDeviceRequest { + /** + * The command data to send to the device. + */ + binaryData?: string; + /** + * Optional subfolder for the command. If empty, the command will be + * delivered to the /devices/{device-id}/commands topic, otherwise it will + * be delivered to the /devices/{device-id}/commands/{subfolder} topic. + * Multi-level subfolders are allowed. This field must not have more than + * 256 characters, and must not contain any MQTT wildcards ("+" or + * "#") or null characters. + */ + subfolder?: string; + } + /** + * Response for `SendCommandToDevice`. + */ + export interface Schema$SendCommandToDeviceResponse {} /** * Request message for `SetIamPolicy` method. */ @@ -1874,6 +1907,98 @@ export namespace cloudiot_v1 { return createAPIRequest(parameters); } } + + + /** + * cloudiot.projects.locations.registries.devices.sendCommandToDevice + * @desc Sends a command to the specified device. In order for a device to + * be able to receive commands, it must: 1) be connected to Cloud IoT Core + * using the MQTT protocol, and 2) be subscribed to the group of MQTT topics + * specified by /devices/{device-id}/commands/#. This subscription will + * receive commands at the top-level topic /devices/{device-id}/commands + * as well as commands for subfolders, like + * /devices/{device-id}/commands/subfolder. Note that subscribing to + * specific subfolders is not supported. If the command could not be + * delivered to the device, this method will return an error; in particular, + * if the device is not subscribed, this method will return + * FAILED_PRECONDITION. Otherwise, this method will return OK. If the + * subscription is QoS 1, at least once delivery will be guaranteed; for QoS + * 0, no acknowledgment will be expected from the device. + * @alias cloudiot.projects.locations.registries.devices.sendCommandToDevice + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {().SendCommandToDeviceRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + sendCommandToDevice( + params?: + Params$Resource$Projects$Locations$Registries$Devices$Sendcommandtodevice, + options?: MethodOptions): + AxiosPromise; + sendCommandToDevice( + params: + Params$Resource$Projects$Locations$Registries$Devices$Sendcommandtodevice, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + sendCommandToDevice( + params: + Params$Resource$Projects$Locations$Registries$Devices$Sendcommandtodevice, + callback: BodyResponseCallback): + void; + sendCommandToDevice( + callback: BodyResponseCallback): + void; + sendCommandToDevice( + paramsOrCallback?: + Params$Resource$Projects$Locations$Registries$Devices$Sendcommandtodevice| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Registries$Devices$Sendcommandtodevice; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Locations$Registries$Devices$Sendcommandtodevice; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudiot.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:sendCommandToDevice') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Registries$Devices$Create { @@ -2014,6 +2139,25 @@ export namespace cloudiot_v1 { */ requestBody?: Schema$Device; } + export interface Params$Resource$Projects$Locations$Registries$Devices$Sendcommandtodevice { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` + * or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SendCommandToDeviceRequest; + } export class Resource$Projects$Locations$Registries$Devices$Configversions { root: Cloudiot; @@ -2851,6 +2995,99 @@ export namespace cloudiot_v1 { return createAPIRequest(parameters); } } + + + /** + * cloudiot.projects.locations.registries.groups.devices.sendCommandToDevice + * @desc Sends a command to the specified device. In order for a device to + * be able to receive commands, it must: 1) be connected to Cloud IoT Core + * using the MQTT protocol, and 2) be subscribed to the group of MQTT topics + * specified by /devices/{device-id}/commands/#. This subscription will + * receive commands at the top-level topic /devices/{device-id}/commands + * as well as commands for subfolders, like + * /devices/{device-id}/commands/subfolder. Note that subscribing to + * specific subfolders is not supported. If the command could not be + * delivered to the device, this method will return an error; in particular, + * if the device is not subscribed, this method will return + * FAILED_PRECONDITION. Otherwise, this method will return OK. If the + * subscription is QoS 1, at least once delivery will be guaranteed; for QoS + * 0, no acknowledgment will be expected from the device. + * @alias + * cloudiot.projects.locations.registries.groups.devices.sendCommandToDevice + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + * @param {().SendCommandToDeviceRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + sendCommandToDevice( + params?: + Params$Resource$Projects$Locations$Registries$Groups$Devices$Sendcommandtodevice, + options?: MethodOptions): + AxiosPromise; + sendCommandToDevice( + params: + Params$Resource$Projects$Locations$Registries$Groups$Devices$Sendcommandtodevice, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + sendCommandToDevice( + params: + Params$Resource$Projects$Locations$Registries$Groups$Devices$Sendcommandtodevice, + callback: BodyResponseCallback): + void; + sendCommandToDevice( + callback: BodyResponseCallback): + void; + sendCommandToDevice( + paramsOrCallback?: + Params$Resource$Projects$Locations$Registries$Groups$Devices$Sendcommandtodevice| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Locations$Registries$Groups$Devices$Sendcommandtodevice; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Locations$Registries$Groups$Devices$Sendcommandtodevice; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudiot.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:sendCommandToDevice') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Registries$Groups$Devices$Get { @@ -2959,6 +3196,25 @@ export namespace cloudiot_v1 { */ requestBody?: Schema$Device; } + export interface Params$Resource$Projects$Locations$Registries$Groups$Devices$Sendcommandtodevice { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the device. For example, + * `projects/p0/locations/us-central1/registries/registry0/devices/device0` + * or + * `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SendCommandToDeviceRequest; + } export class Resource$Projects$Locations$Registries$Groups$Devices$Configversions { diff --git a/src/apis/composer/v1.ts b/src/apis/composer/v1.ts index e68d3975646..57ee2be4470 100644 --- a/src/apis/composer/v1.ts +++ b/src/apis/composer/v1.ts @@ -118,8 +118,8 @@ export namespace composer_v1 { */ export interface Schema$EnvironmentConfig { /** - * The URI of the Apache Airflow Web UI hosted within this environment (see - * [Airflow web + * Output only. The URI of the Apache Airflow Web UI hosted within this + * environment (see [Airflow web * interface](/composer/docs/how-to/accessing/airflow-web-interface)). */ airflowUri?: string; diff --git a/src/apis/composer/v1beta1.ts b/src/apis/composer/v1beta1.ts index c8980fcf05a..042beddc747 100644 --- a/src/apis/composer/v1beta1.ts +++ b/src/apis/composer/v1beta1.ts @@ -118,8 +118,8 @@ export namespace composer_v1beta1 { */ export interface Schema$EnvironmentConfig { /** - * The URI of the Apache Airflow Web UI hosted within this environment (see - * [Airflow web + * Output only. The URI of the Apache Airflow Web UI hosted within this + * environment (see [Airflow web * interface](/composer/docs/how-to/accessing/airflow-web-interface)). */ airflowUri?: string; @@ -368,15 +368,28 @@ export namespace composer_v1beta1 { */ envVariables?: any; /** - * Output only. The version of the software running in the environment. This + * Immutable. The version of the software running in the environment. This * encapsulates both the version of Cloud Composer functionality and the * version of Apache Airflow. It must match the regular expression - * `composer-[0-9]+\.[0-9]+(\.[0-9]+)?-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. - * The Cloud Composer portion of the version is a [semantic - * version](https://semver.org). The portion of the image version following - * <em>airflow-</em> is an official Apache Airflow repository - * [release name](https://github.com/apache/incubator-airflow/releases). See - * also [Release Notes](/composer/docs/release-notes). + * `composer-([0-9]+\.[0-9]+(\.[0-9]+)?|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + * When used as input, the server will also check if the provided version is + * supported and deny the creation request for an unsupported version. The + * Cloud Composer portion of the version is a [semantic + * version](https://semver.org) or `latest`. The patch version can be + * omitted and the current Cloud Composer patch version will be selected. + * When `latest` is provided instead of an explicit version number, the + * server will replace `latest` with the current Cloud Composer version and + * store that version number in the same field. The portion of the image + * version that follows <em>airflow-</em> is an official Apache + * Airflow repository [release + * name](https://github.com/apache/incubator-airflow/releases). Supported + * values for input are: * `composer-latest-airflow-latest` * + * `composer-latest-airflow-1.10.0` * `composer-latest-airflow-1.9.0` * + * `composer-latest-airflow-1.10` * `composer-latest-airflow-1.9` * + * `composer-1.1.1-airflow-latest` * `composer-1.1.1-airflow-1.10.0` * + * `composer-1.1.1-airflow-1.9.0` * `composer-1.1.1-airflow-1.10` * + * `composer-1.1.1-airflow-1.9` See also [Release + * Notes](/composer/docs/release-notes). */ imageVersion?: string; /** @@ -388,6 +401,13 @@ export namespace composer_v1beta1 { * pinning it to a version specifier, use the empty string as the value. */ pypiPackages?: any; + /** + * Optional. The major version of Python used to run the Apache Airflow + * scheduler, worker, and webserver processes. Can be set to '2' or + * '3'. If not specified, the default is '2'. Cannot be + * updated. + */ + pythonVersion?: string; } /** * The `Status` type defines a logical error model that is suitable for diff --git a/src/apis/compute/alpha.ts b/src/apis/compute/alpha.ts index ef9194e4513..19c85f85b3f 100644 --- a/src/apis/compute/alpha.ts +++ b/src/apis/compute/alpha.ts @@ -3132,12 +3132,13 @@ export namespace compute_alpha { * only. A global forwarding rule supports either IPv4 or IPv6. When the * load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL * reference to an existing Address resource ( internal regional static IP - * address). When the load balancing scheme is INTERNAL, this can only be - * an RFC 1918 IP address belonging to the network/subnet configured for the - * forwarding rule. By default, if this field is empty, an ephemeral - * internal IP address will be automatically allocated from the IP range of - * the subnet or network configured for this forwarding rule. An address - * can be specified either by a literal IP address or a URL reference to an + * address), with a purpose of GCE_END_POINT and address_type of INTERNAL. + * When the load balancing scheme is INTERNAL, this can only be an RFC 1918 + * IP address belonging to the network/subnet configured for the forwarding + * rule. By default, if this field is empty, an ephemeral internal IP + * address will be automatically allocated from the IP range of the subnet + * or network configured for this forwarding rule. An address can be + * specified either by a literal IP address or a URL reference to an * existing Address resource. The following examples are all valid: - * 100.1.2.3 - * https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address @@ -3410,6 +3411,15 @@ export namespace compute_alpha { * guest attributes entry. */ kind?: string; + /** + * The path to be queried. This can be the default namespace ('/') + * or a nested namespace ('//') or a specified key ('//') + */ + queryPath?: string; + /** + * [Output Only] The value of the requested queried path. + */ + queryValue?: Schema$GuestAttributesValue; /** * [Output Only] Server-defined URL for this resource. */ @@ -3423,6 +3433,29 @@ export namespace compute_alpha { */ variableValue?: string; } + /** + * A guest attributes namespace/key/value entry. + */ + export interface Schema$GuestAttributesEntry { + /** + * Key for the guest attribute entry. + */ + key?: string; + /** + * Namespace for the guest attribute entry. + */ + namespace?: string; + /** + * Value for the guest attribute entry. + */ + value?: string; + } + /** + * Array of guest attribute namespace/key/value tuples. + */ + export interface Schema$GuestAttributesValue { + items?: Schema$GuestAttributesEntry[]; + } /** * Guest OS features. */ @@ -4215,6 +4248,10 @@ export namespace compute_alpha { * v1.instances ==) */ export interface Schema$Instance { + /** + * The configuration of desired allocations which this Instance could + * consume capacity from. + */ allocationAffinity?: Schema$AllocationAffinity; /** * Allows this instance to send and receive packets with non-matching @@ -5045,13 +5082,21 @@ export namespace compute_alpha { * group itself is not being modified. */ isStable?: boolean; + /** + * [Output Only] A status of consistency of Instances' versions with + * their target version specified by version field on Instance Group + * Manager. + */ + versionTarget?: Schema$InstanceGroupManagerStatusVersionTarget; + } + export interface Schema$InstanceGroupManagerStatusVersionTarget { /** * [Output Only] A bit indicating whether version target has been reached in * this managed instance group, i.e. all instances are in their target * version. Instances' target version are specified by version field on * Instance Group Manager. */ - versionTargetReached?: boolean; + isReached?: boolean; } /** * InstanceGroupManagers.updatePerInstanceConfigs @@ -5297,6 +5342,11 @@ export namespace compute_alpha { targetInstance?: string; } export interface Schema$InstanceProperties { + /** + * The configuration of desired allocations which this Instance could + * consume capacity from. + */ + allocationAffinity?: Schema$AllocationAffinity; /** * Enables instances created based on this template to send packets with * source IP addresses other than their own and receive packets with @@ -6445,8 +6495,8 @@ export namespace compute_alpha { */ licenseCode?: string; /** - * [Output Only] Name of the resource. The name is 1-63 characters long and - * complies with RFC1035. + * Name of the resource. The name must be 1-63 characters long and comply + * with RFC1035. */ name?: string; resourceRequirements?: Schema$LicenseResourceRequirements; @@ -6587,16 +6637,17 @@ export namespace compute_alpha { * and end in "_count". Field names should not contain an initial * slash. The actual exported metric names will have "/iam/policy" * prepended. Field names correspond to IAM request parameters and field - * values are their respective values. At present the only supported field - * names are - "iam_principal", corresponding to - * IAMContext.principal; - "" (empty string), resulting in one - * aggretated counter with no field. Examples: counter { metric: + * values are their respective values. Supported field names: - + * "authority", which is "[token]" if IAMContext.token is + * present, otherwise the value of IAMContext.authority_selector if present, + * and otherwise a representation of IAMContext.principal; or - + * "iam_principal", a representation of IAMContext.principal even if + * a token or authority selector is present; or - "" (empty string), + * resulting in a counter with no fields. Examples: counter { metric: * "/debug_access_count" field: "iam_principal" } ==> * increment counter /iam/policy/backend_debug_access_count * {iam_principal=[value of IAMContext.principal]} At this time we do not - * support: * multiple field names (though this may be supported in the - * future) * decrementing the counter * incrementing it by anything other than - * 1 + * support multiple field names (though this may be supported in the future). */ export interface Schema$LogConfigCounterOptions { /** @@ -6658,13 +6709,17 @@ export namespace compute_alpha { */ selfLink?: string; /** - * The source instance used to create the template. You can provide this as - * a partial or full URL to the resource. For example, the following are - * valid values: - + * The source instance used to create the machine image. You can provide + * this as a partial or full URL to the resource. For example, the following + * are valid values: - * https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance * - projects/project/zones/zone/instances/instance */ sourceInstance?: string; + /** + * [Output Only] properties of source instance. Currently, input for this + * field is not supported. + */ sourceInstanceProperties?: Schema$SourceInstanceProperties; /** * [Output Only] The status of disk creation. @@ -7008,17 +7063,17 @@ export namespace compute_alpha { port?: number; } /** - * Represents a Network resource. Read Networks and Firewalls for more - * information. (== resource_for v1.networks ==) (== resource_for - * beta.networks ==) + * Represents a Network resource. Read Virtual Private Cloud (VPC) Network + * Overview for more information. (== resource_for v1.networks ==) (== + * resource_for beta.networks ==) */ export interface Schema$Network { /** - * When set to true, the network is created in "auto subnet mode". - * When set to false, the network is in "custom subnet mode". In - * "auto subnet mode", a newly created network is assigned the - * default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork - * per region. + * When set to true, the VPC network is created in "auto" mode. + * When set to false, the VPC network is created in "custom" mode. + * An auto mode VPC network starts with one subnet per region. Each subnet + * has a predetermined range as described in Auto mode VPC network IP + * ranges. */ autoCreateSubnetworks?: boolean; /** @@ -7035,9 +7090,8 @@ export namespace compute_alpha { */ description?: string; /** - * A gateway address for default routing to other networks. This value is - * read only and is selected by the Google Compute Engine, typically as the - * first usable address in the IPv4Range. + * [Output Only] The gateway address for default routing out of the network. + * This value is read only and is selected by GCP. */ gatewayIPv4?: string; /** @@ -7085,7 +7139,7 @@ export namespace compute_alpha { selfLink?: string; /** * [Output Only] Server-defined fully-qualified URLs for all subnetworks in - * this network. + * this VPC network. */ subnetworks?: string[]; } @@ -7123,6 +7177,11 @@ export namespace compute_alpha { * [Output Only] Creation timestamp in RFC3339 text format. */ creationTimestamp?: string; + /** + * The default port used if the port number is not specified in the network + * endpoint. + */ + defaultPort?: number; /** * An optional description of this resource. Provide this property when you * create the resource. @@ -7153,6 +7212,11 @@ export namespace compute_alpha { * dash. */ name?: string; + /** + * The URL of the network to which all network endpoints in the NEG belong. + * Uses "default" project network if unspecified. + */ + network?: string; /** * Type of network endpoints in this network endpoint group. Currently the * only supported value is GCE_VM_IP_PORT. @@ -7166,11 +7230,21 @@ export namespace compute_alpha { * [Output only] Number of network endpoints in the network endpoint group. */ size?: number; + /** + * Optional URL of the subnetwork to which all network endpoints in the NEG + * belong. + */ + subnetwork?: string; /** * Specify the type of this network endpoint group. Only LOAD_BALANCING is * valid for now. */ type?: string; + /** + * [Output Only] The URL of the zone where the network endpoint group is + * located. + */ + zone?: string; } export interface Schema$NetworkEndpointGroupAggregatedList { /** @@ -7483,9 +7557,9 @@ export namespace compute_alpha { export interface Schema$NetworkRoutingConfig { /** * The network-wide routing mode to use. If set to REGIONAL, this - * network's cloud routers will only advertise routes with subnetworks - * of this network in the same region as the router. If set to GLOBAL, this - * network's cloud routers will advertise routes with all subnetworks of + * network's cloud routers will only advertise routes with subnets of + * this network in the same region as the router. If set to GLOBAL, this + * network's cloud routers will advertise routes with all subnets of * this network, across regions. */ routingMode?: string; @@ -9936,9 +10010,9 @@ export namespace compute_alpha { * when you attach the disk to a virtual machine instance. If you do not * provide an encryption key, then the disk will be encrypted using an * automatically generated key and you do not need to provide a key to use - * the disk later. Instance templates do not store customer-supplied - * encryption keys, so you cannot use your own keys to encrypt disks in a - * managed instance group. + * the disk later. Machine Images do not store customer-supplied encryption + * keys, so you cannot use your own keys to encrypt disks in a managed + * instance group. */ diskEncryptionKey?: Schema$CustomerEncryptionKey; /** @@ -10002,7 +10076,7 @@ export namespace compute_alpha { * initializeParams.sourceImage or disks.source is required except for local * SSD. If desired, you can also attach existing non-root persistent disks * using this property. This field is only applicable for persistent disks. - * Note that for InstanceTemplate, specify the disk name, not the URL for + * Note that for sourceMachineImage, specify the disk name, not the URL for * the disk. */ source?: string; @@ -10315,6 +10389,25 @@ export namespace compute_alpha { */ enableVtpm?: boolean; } + /** + * A shielded VM identity entry. + */ + export interface Schema$ShieldedVmIdentity { + encryptionKey?: Schema$ShieldedVmIdentityEntry; + /** + * [Output Only] Type of the resource. Always compute#shieldedVmIdentity for + * shielded VM identity entry. + */ + kind?: string; + signingKey?: Schema$ShieldedVmIdentityEntry; + } + /** + * A Shielded VM Identity Entry. + */ + export interface Schema$ShieldedVmIdentityEntry { + ekCert?: string; + ekPub?: string; + } /** * The policy describes the baseline against which VM instance boot integrity * is measured. @@ -10521,8 +10614,8 @@ export namespace compute_alpha { } export interface Schema$SourceInstanceProperties { /** - * Enables instances created based on this template to send packets with - * source IP addresses other than their own and receive packets with + * Enables instances created based on this machine image to send packets + * with source IP addresses other than their own and receive packets with * destination IP addresses other than their own. If these instances will be * used as an IP gateway or it will be set as the next-hop in a Route * resource, specify true. If unsure, leave this set to false. See the @@ -10530,37 +10623,38 @@ export namespace compute_alpha { */ canIpForward?: boolean; /** - * Whether the resource should be protected against deletion. + * Whether the instance created from the machine image should be protected + * against deletion. */ deletionProtection?: boolean; /** * An optional text description for the instances that are created from this - * instance template. + * machine image. */ description?: string; /** * An array of disks that are associated with the instances that are created - * from this template. + * from this machine image. */ disks?: Schema$SavedAttachedDisk[]; /** * A list of guest accelerator cards' type and count to use for - * instances created from the instance template. + * instances created from the machine image. */ guestAccelerators?: Schema$AcceleratorConfig[]; /** - * Labels to apply to instances that are created from this template. + * Labels to apply to instances that are created from this machine image. */ labels?: any; /** - * The machine type to use for instances that are created from this - * template. + * The machine type to use for instances that are created from this machine + * image. */ machineType?: string; /** * The metadata key/value pairs to assign to instances that are created from - * this template. These pairs can consist of custom metadata or predefined - * keys. See Project and instance metadata for more information. + * this machine image. These pairs can consist of custom metadata or + * predefined keys. See Project and instance metadata for more information. */ metadata?: Schema$Metadata; /** @@ -10577,19 +10671,19 @@ export namespace compute_alpha { networkInterfaces?: Schema$NetworkInterface[]; /** * Specifies the scheduling options for the instances that are created from - * this template. + * this machine image. */ scheduling?: Schema$Scheduling; /** * A list of service accounts with specified scopes. Access tokens for these * service accounts are available to the instances that are created from - * this template. Use metadata queries to obtain the access tokens for these - * instances. + * this machine image. Use metadata queries to obtain the access tokens for + * these instances. */ serviceAccounts?: Schema$ServiceAccount[]; /** * A list of tags to apply to the instances that are created from this - * template. The tags identify valid sources or targets for network + * machine image. The tags identify valid sources or targets for network * firewalls. The setTags method can modify this list of tags. Each tag * within the list must comply with RFC1035. */ @@ -11000,7 +11094,9 @@ export namespace compute_alpha { */ description?: string; /** - * Whether to enable flow logging for this subnetwork. + * Whether to enable flow logging for this subnetwork. If this field is not + * explicitly set, it will not appear in get listings. If not set the + * default behavior is to disable flow logging. */ enableFlowLogs?: boolean; /** @@ -31536,6 +31632,7 @@ export namespace compute_alpha { * @param {object} params Parameters for request * @param {string} params.instance Name of the instance scoping this request. * @param {string} params.project Project ID for this request. + * @param {string=} params.queryPath Specifies the guest attributes path to be queried. * @param {string=} params.variableKey Specifies the key for the guest attributes entry. * @param {string} params.zone The name of the zone for this request. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -31746,6 +31843,78 @@ export namespace compute_alpha { } + /** + * compute.instances.getShieldedVmIdentity + * @desc Returns the Shielded VM Identity of an instance + * @alias compute.instances.getShieldedVmIdentity + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.instance Name of the instance scoping this request. + * @param {string} params.project Project ID for this request. + * @param {string} params.zone The name of the zone for this request. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + getShieldedVmIdentity( + params?: Params$Resource$Instances$Getshieldedvmidentity, + options?: MethodOptions): AxiosPromise; + getShieldedVmIdentity( + params: Params$Resource$Instances$Getshieldedvmidentity, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + getShieldedVmIdentity( + params: Params$Resource$Instances$Getshieldedvmidentity, + callback: BodyResponseCallback): void; + getShieldedVmIdentity( + callback: BodyResponseCallback): void; + getShieldedVmIdentity( + paramsOrCallback?: Params$Resource$Instances$Getshieldedvmidentity| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Instances$Getshieldedvmidentity; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Getshieldedvmidentity; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: + (rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instances/{instance}/getShieldedVmIdentity') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * compute.instances.insert * @desc Creates an instance resource in the specified project using the @@ -34065,6 +34234,10 @@ export namespace compute_alpha { * Project ID for this request. */ project?: string; + /** + * Specifies the guest attributes path to be queried. + */ + queryPath?: string; /** * Specifies the key for the guest attributes entry. */ @@ -34124,6 +34297,25 @@ export namespace compute_alpha { */ zone?: string; } + export interface Params$Resource$Instances$Getshieldedvmidentity { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } export interface Params$Resource$Instances$Insert { /** * Auth client or API Key for the request @@ -39310,10 +39502,8 @@ export namespace compute_alpha { /** * compute.machineImages.delete - * @desc Deletes the specified machine image. If you delete an instance - * template that is being referenced from another instance group, the - * instance group will not be able to create or recreate virtual machine - * instances. Deleting an machine image is permanent and cannot be undone. + * @desc Deletes the specified machine image. Deleting a machine image is + * permanent and cannot be undone. * @alias compute.machineImages.delete * @memberOf! () * @@ -39521,18 +39711,18 @@ export namespace compute_alpha { /** * compute.machineImages.insert - * @desc Creates an machine image in the specified project using the data - * that is included in the request. If you are creating a new template to - * update an existing instance group, your new machine image must use the + * @desc Creates a machine image in the specified project using the data + * that is included in the request. If you are creating a new machine image + * to update an existing instance, your new machine image should use the * same network or, if applicable, the same subnetwork as the original - * template. + * instance. * @alias compute.machineImages.insert * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.project Project ID for this request. * @param {string=} params.requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @param {string=} params.sourceInstance Optional. Source image to restore onto a disk. + * @param {string=} params.sourceInstance Required. Source instance that is used to create the machine image from. * @param {().MachineImage} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -39892,7 +40082,7 @@ export namespace compute_alpha { */ requestId?: string; /** - * Optional. Source image to restore onto a disk. + * Required. Source instance that is used to create the machine image from. */ sourceInstance?: string; diff --git a/src/apis/compute/beta.ts b/src/apis/compute/beta.ts index ba2483e1701..6220bf7809f 100644 --- a/src/apis/compute/beta.ts +++ b/src/apis/compute/beta.ts @@ -5848,16 +5848,17 @@ export namespace compute_beta { * and end in "_count". Field names should not contain an initial * slash. The actual exported metric names will have "/iam/policy" * prepended. Field names correspond to IAM request parameters and field - * values are their respective values. At present the only supported field - * names are - "iam_principal", corresponding to - * IAMContext.principal; - "" (empty string), resulting in one - * aggretated counter with no field. Examples: counter { metric: + * values are their respective values. Supported field names: - + * "authority", which is "[token]" if IAMContext.token is + * present, otherwise the value of IAMContext.authority_selector if present, + * and otherwise a representation of IAMContext.principal; or - + * "iam_principal", a representation of IAMContext.principal even if + * a token or authority selector is present; or - "" (empty string), + * resulting in a counter with no fields. Examples: counter { metric: * "/debug_access_count" field: "iam_principal" } ==> * increment counter /iam/policy/backend_debug_access_count * {iam_principal=[value of IAMContext.principal]} At this time we do not - * support: * multiple field names (though this may be supported in the - * future) * decrementing the counter * incrementing it by anything other than - * 1 + * support multiple field names (though this may be supported in the future). */ export interface Schema$LogConfigCounterOptions { /** @@ -6128,17 +6129,17 @@ export namespace compute_beta { port?: number; } /** - * Represents a Network resource. Read Networks and Firewalls for more - * information. (== resource_for v1.networks ==) (== resource_for - * beta.networks ==) + * Represents a Network resource. Read Virtual Private Cloud (VPC) Network + * Overview for more information. (== resource_for v1.networks ==) (== + * resource_for beta.networks ==) */ export interface Schema$Network { /** - * When set to true, the network is created in "auto subnet mode". - * When set to false, the network is in "custom subnet mode". In - * "auto subnet mode", a newly created network is assigned the - * default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork - * per region. + * When set to true, the VPC network is created in "auto" mode. + * When set to false, the VPC network is created in "custom" mode. + * An auto mode VPC network starts with one subnet per region. Each subnet + * has a predetermined range as described in Auto mode VPC network IP + * ranges. */ autoCreateSubnetworks?: boolean; /** @@ -6151,9 +6152,8 @@ export namespace compute_beta { */ description?: string; /** - * A gateway address for default routing to other networks. This value is - * read only and is selected by the Google Compute Engine, typically as the - * first usable address in the IPv4Range. + * [Output Only] The gateway address for default routing out of the network. + * This value is read only and is selected by GCP. */ gatewayIPv4?: string; /** @@ -6197,7 +6197,7 @@ export namespace compute_beta { selfLink?: string; /** * [Output Only] Server-defined fully-qualified URLs for all subnetworks in - * this network. + * this VPC network. */ subnetworks?: string[]; } @@ -6602,9 +6602,9 @@ export namespace compute_beta { export interface Schema$NetworkRoutingConfig { /** * The network-wide routing mode to use. If set to REGIONAL, this - * network's cloud routers will only advertise routes with subnetworks - * of this network in the same region as the router. If set to GLOBAL, this - * network's cloud routers will advertise routes with all subnetworks of + * network's cloud routers will only advertise routes with subnets of + * this network in the same region as the router. If set to GLOBAL, this + * network's cloud routers will advertise routes with all subnets of * this network, across regions. */ routingMode?: string; diff --git a/src/apis/compute/v1.ts b/src/apis/compute/v1.ts index 092a25edf27..adcf4602e6f 100644 --- a/src/apis/compute/v1.ts +++ b/src/apis/compute/v1.ts @@ -1611,6 +1611,10 @@ export namespace compute_v1 { * Represents a customer-supplied encryption key */ export interface Schema$CustomerEncryptionKey { + /** + * The name of the encryption key that is stored in Google Cloud KMS. + */ + kmsKeyName?: string; /** * Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 * base64 to either encrypt or decrypt this resource. @@ -2352,12 +2356,13 @@ export namespace compute_v1 { * only. A global forwarding rule supports either IPv4 or IPv6. When the * load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL * reference to an existing Address resource ( internal regional static IP - * address). When the load balancing scheme is INTERNAL, this can only be - * an RFC 1918 IP address belonging to the network/subnet configured for the - * forwarding rule. By default, if this field is empty, an ephemeral - * internal IP address will be automatically allocated from the IP range of - * the subnet or network configured for this forwarding rule. An address - * can be specified either by a literal IP address or a URL reference to an + * address), with a purpose of GCE_END_POINT and address_type of INTERNAL. + * When the load balancing scheme is INTERNAL, this can only be an RFC 1918 + * IP address belonging to the network/subnet configured for the forwarding + * rule. By default, if this field is empty, an ephemeral internal IP + * address will be automatically allocated from the IP range of the subnet + * or network configured for this forwarding rule. An address can be + * specified either by a literal IP address or a URL reference to an * existing Address resource. The following examples are all valid: - * 100.1.2.3 - * https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address @@ -2757,6 +2762,12 @@ export namespace compute_v1 { * /. */ requestPath?: string; + /** + * The string to match anywhere in the first 1024 bytes of the response + * body. If left empty (the default value), the status code determines + * health. The response data can only be ASCII. + */ + response?: string; } /** * An HttpHealthCheck resource. This resource defines a template for how @@ -2969,6 +2980,12 @@ export namespace compute_v1 { * /. */ requestPath?: string; + /** + * The string to match anywhere in the first 1024 bytes of the response + * body. If left empty (the default value), the status code determines + * health. The response data can only be ASCII. + */ + response?: string; } /** * Contains a list of HttpsHealthCheck resources. @@ -4868,8 +4885,8 @@ export namespace compute_v1 { */ licenseCode?: string; /** - * [Output Only] Name of the resource. The name is 1-63 characters long and - * complies with RFC1035. + * Name of the resource. The name must be 1-63 characters long and comply + * with RFC1035. */ name?: string; resourceRequirements?: Schema$LicenseResourceRequirements; @@ -5217,17 +5234,17 @@ export namespace compute_v1 { port?: number; } /** - * Represents a Network resource. Read Networks and Firewalls for more - * information. (== resource_for v1.networks ==) (== resource_for - * beta.networks ==) + * Represents a Network resource. Read Virtual Private Cloud (VPC) Network + * Overview for more information. (== resource_for v1.networks ==) (== + * resource_for beta.networks ==) */ export interface Schema$Network { /** - * When set to true, the network is created in "auto subnet mode". - * When set to false, the network is in "custom subnet mode". In - * "auto subnet mode", a newly created network is assigned the - * default CIDR of 10.128.0.0/9 and it automatically creates one subnetwork - * per region. + * When set to true, the VPC network is created in "auto" mode. + * When set to false, the VPC network is created in "custom" mode. + * An auto mode VPC network starts with one subnet per region. Each subnet + * has a predetermined range as described in Auto mode VPC network IP + * ranges. */ autoCreateSubnetworks?: boolean; /** @@ -5240,9 +5257,8 @@ export namespace compute_v1 { */ description?: string; /** - * A gateway address for default routing to other networks. This value is - * read only and is selected by the Google Compute Engine, typically as the - * first usable address in the IPv4Range. + * [Output Only] The gateway address for default routing out of the network. + * This value is read only and is selected by GCP. */ gatewayIPv4?: string; /** @@ -5286,7 +5302,7 @@ export namespace compute_v1 { selfLink?: string; /** * [Output Only] Server-defined fully-qualified URLs for all subnetworks in - * this network. + * this VPC network. */ subnetworks?: string[]; } @@ -5434,9 +5450,9 @@ export namespace compute_v1 { export interface Schema$NetworkRoutingConfig { /** * The network-wide routing mode to use. If set to REGIONAL, this - * network's cloud routers will only advertise routes with subnetworks - * of this network in the same region as the router. If set to GLOBAL, this - * network's cloud routers will advertise routes with all subnetworks of + * network's cloud routers will only advertise routes with subnets of + * this network in the same region as the router. If set to GLOBAL, this + * network's cloud routers will advertise routes with all subnets of * this network, across regions. */ routingMode?: string; @@ -7868,7 +7884,9 @@ export namespace compute_v1 { */ description?: string; /** - * Whether to enable flow logging for this subnetwork. + * Whether to enable flow logging for this subnetwork. If this field is not + * explicitly set, it will not appear in get listings. If not set the + * default behavior is to disable flow logging. */ enableFlowLogs?: boolean; /** diff --git a/src/apis/content/v2.ts b/src/apis/content/v2.ts index cf7db2a58e7..873a8988be2 100644 --- a/src/apis/content/v2.ts +++ b/src/apis/content/v2.ts @@ -2103,10 +2103,10 @@ export namespace content_v2 { */ placedDate?: string; /** - * The details of the merchant provided promotions applied to the order. - * More details about the program are here. + * Deprecated. The details of the merchant provided promotions applied to + * the order. More details about the program are here. */ - promotions?: Schema$OrderPromotion[]; + promotions?: Schema$OrderLegacyPromotion[]; /** * Refunds for the order. */ @@ -2334,6 +2334,66 @@ export namespace content_v2 { */ reason?: string; } + export interface Schema$OrderLegacyPromotion { + benefits?: Schema$OrderLegacyPromotionBenefit[]; + /** + * The date and time frame when the promotion is active and ready for + * validation review. Note that the promotion live time may be delayed for a + * few hours due to the validation review. Start date and end date are + * separated by a forward slash (/). The start date is specified by the + * format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when + * the sale starts (in Greenwich Mean Time, GMT), followed by an expression + * of the time zone for the sale. The end date is in the same format. + */ + effectiveDates?: string; + /** + * Optional. The text code that corresponds to the promotion when applied on + * the retailer?s website. + */ + genericRedemptionCode?: string; + /** + * The unique ID of the promotion. + */ + id?: string; + /** + * The full title of the promotion. + */ + longTitle?: string; + /** + * Whether the promotion is applicable to all products or only specific + * products. + */ + productApplicability?: string; + /** + * Indicates that the promotion is valid online. + */ + redemptionChannel?: string; + } + export interface Schema$OrderLegacyPromotionBenefit { + /** + * The discount in the order price when the promotion is applied. + */ + discount?: Schema$Price; + /** + * The OfferId(s) that were purchased in this order and map to this specific + * benefit of the promotion. + */ + offerIds?: string[]; + /** + * Further describes the benefit of the promotion. Note that we will expand + * on this enumeration as we support new promotion sub-types. + */ + subType?: string; + /** + * The impact on tax when the promotion is applied. + */ + taxImpact?: Schema$Price; + /** + * Describes whether the promotion applies to products (e.g. 20% off) or to + * shipping (e.g. Free Shipping). + */ + type?: string; + } export interface Schema$OrderLineItem { /** * Annotations that are attached to the line item. @@ -2642,66 +2702,6 @@ export namespace content_v2 { */ kind?: string; } - export interface Schema$OrderPromotion { - benefits?: Schema$OrderPromotionBenefit[]; - /** - * The date and time frame when the promotion is active and ready for - * validation review. Note that the promotion live time may be delayed for a - * few hours due to the validation review. Start date and end date are - * separated by a forward slash (/). The start date is specified by the - * format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when - * the sale starts (in Greenwich Mean Time, GMT), followed by an expression - * of the time zone for the sale. The end date is in the same format. - */ - effectiveDates?: string; - /** - * Optional. The text code that corresponds to the promotion when applied on - * the retailer?s website. - */ - genericRedemptionCode?: string; - /** - * The unique ID of the promotion. - */ - id?: string; - /** - * The full title of the promotion. - */ - longTitle?: string; - /** - * Whether the promotion is applicable to all products or only specific - * products. - */ - productApplicability?: string; - /** - * Indicates that the promotion is valid online. - */ - redemptionChannel?: string; - } - export interface Schema$OrderPromotionBenefit { - /** - * The discount in the order price when the promotion is applied. - */ - discount?: Schema$Price; - /** - * The OfferId(s) that were purchased in this order and map to this specific - * benefit of the promotion. - */ - offerIds?: string[]; - /** - * Further describes the benefit of the promotion. Note that we will expand - * on this enumeration as we support new promotion sub-types. - */ - subType?: string; - /** - * The impact on tax when the promotion is applied. - */ - taxImpact?: Schema$Price; - /** - * Describes whether the promotion applies to products (e.g. 20% off) or to - * shipping (e.g. Free Shipping). - */ - type?: string; - } export interface Schema$OrderRefund { /** * The actor that created the refund. @@ -5433,10 +5433,10 @@ export namespace content_v2 { */ predefinedDeliveryAddress?: string; /** - * The details of the merchant provided promotions applied to the order. - * More details about the program are here. + * Deprecated. The details of the merchant provided promotions applied to + * the order. More details about the program are here. */ - promotions?: Schema$OrderPromotion[]; + promotions?: Schema$OrderLegacyPromotion[]; /** * The total cost of shipping for all items. */ @@ -10325,7 +10325,7 @@ export namespace content_v2 { * * @param {object} params Parameters for request * @param {string=} params.disbursementEndDate The last date which disbursements occurred. In ISO 8601 format. Default: current date. - * @param {string=} params.disbursementStartDate The first date which disbursements occurred. In ISO 8601 format. + * @param {string} params.disbursementStartDate The first date which disbursements occurred. In ISO 8601 format. * @param {integer=} params.maxResults The maximum number of disbursements to return in the response, used for paging. * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. * @param {string=} params.pageToken The token returned by the previous request. @@ -10387,7 +10387,7 @@ export namespace content_v2 { }, options), params, - requiredParams: ['merchantId'], + requiredParams: ['merchantId', 'disbursementStartDate'], pathParams: ['merchantId'], context: this.getRoot() }; @@ -10414,7 +10414,7 @@ export namespace content_v2 { * @param {string} params.merchantId The ID of the account that manages the order. This cannot be a multi-client account. * @param {string=} params.pageToken The token returned by the previous request. * @param {string=} params.transactionEndDate The last date in which transaction occurred. In ISO 8601 format. Default: current date. - * @param {string=} params.transactionStartDate The first date in which transaction occurred. In ISO 8601 format. + * @param {string} params.transactionStartDate The first date in which transaction occurred. In ISO 8601 format. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -10474,7 +10474,8 @@ export namespace content_v2 { }, options), params, - requiredParams: ['merchantId', 'disbursementId'], + requiredParams: + ['merchantId', 'disbursementId', 'transactionStartDate'], pathParams: ['disbursementId', 'merchantId'], context: this.getRoot() }; diff --git a/src/apis/content/v2sandbox.ts b/src/apis/content/v2sandbox.ts index 959238cb801..e073d873fc1 100644 --- a/src/apis/content/v2sandbox.ts +++ b/src/apis/content/v2sandbox.ts @@ -237,10 +237,10 @@ export namespace content_v2sandbox { */ placedDate?: string; /** - * The details of the merchant provided promotions applied to the order. - * More details about the program are here. + * Deprecated. The details of the merchant provided promotions applied to + * the order. More details about the program are here. */ - promotions?: Schema$OrderPromotion[]; + promotions?: Schema$OrderLegacyPromotion[]; /** * Refunds for the order. */ @@ -468,6 +468,66 @@ export namespace content_v2sandbox { */ reason?: string; } + export interface Schema$OrderLegacyPromotion { + benefits?: Schema$OrderLegacyPromotionBenefit[]; + /** + * The date and time frame when the promotion is active and ready for + * validation review. Note that the promotion live time may be delayed for a + * few hours due to the validation review. Start date and end date are + * separated by a forward slash (/). The start date is specified by the + * format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when + * the sale starts (in Greenwich Mean Time, GMT), followed by an expression + * of the time zone for the sale. The end date is in the same format. + */ + effectiveDates?: string; + /** + * Optional. The text code that corresponds to the promotion when applied on + * the retailer?s website. + */ + genericRedemptionCode?: string; + /** + * The unique ID of the promotion. + */ + id?: string; + /** + * The full title of the promotion. + */ + longTitle?: string; + /** + * Whether the promotion is applicable to all products or only specific + * products. + */ + productApplicability?: string; + /** + * Indicates that the promotion is valid online. + */ + redemptionChannel?: string; + } + export interface Schema$OrderLegacyPromotionBenefit { + /** + * The discount in the order price when the promotion is applied. + */ + discount?: Schema$Price; + /** + * The OfferId(s) that were purchased in this order and map to this specific + * benefit of the promotion. + */ + offerIds?: string[]; + /** + * Further describes the benefit of the promotion. Note that we will expand + * on this enumeration as we support new promotion sub-types. + */ + subType?: string; + /** + * The impact on tax when the promotion is applied. + */ + taxImpact?: Schema$Price; + /** + * Describes whether the promotion applies to products (e.g. 20% off) or to + * shipping (e.g. Free Shipping). + */ + type?: string; + } export interface Schema$OrderLineItem { /** * Annotations that are attached to the line item. @@ -776,66 +836,6 @@ export namespace content_v2sandbox { */ kind?: string; } - export interface Schema$OrderPromotion { - benefits?: Schema$OrderPromotionBenefit[]; - /** - * The date and time frame when the promotion is active and ready for - * validation review. Note that the promotion live time may be delayed for a - * few hours due to the validation review. Start date and end date are - * separated by a forward slash (/). The start date is specified by the - * format (YYYY-MM-DD), followed by the letter ?T?, the time of the day when - * the sale starts (in Greenwich Mean Time, GMT), followed by an expression - * of the time zone for the sale. The end date is in the same format. - */ - effectiveDates?: string; - /** - * Optional. The text code that corresponds to the promotion when applied on - * the retailer?s website. - */ - genericRedemptionCode?: string; - /** - * The unique ID of the promotion. - */ - id?: string; - /** - * The full title of the promotion. - */ - longTitle?: string; - /** - * Whether the promotion is applicable to all products or only specific - * products. - */ - productApplicability?: string; - /** - * Indicates that the promotion is valid online. - */ - redemptionChannel?: string; - } - export interface Schema$OrderPromotionBenefit { - /** - * The discount in the order price when the promotion is applied. - */ - discount?: Schema$Price; - /** - * The OfferId(s) that were purchased in this order and map to this specific - * benefit of the promotion. - */ - offerIds?: string[]; - /** - * Further describes the benefit of the promotion. Note that we will expand - * on this enumeration as we support new promotion sub-types. - */ - subType?: string; - /** - * The impact on tax when the promotion is applied. - */ - taxImpact?: Schema$Price; - /** - * Describes whether the promotion applies to products (e.g. 20% off) or to - * shipping (e.g. Free Shipping). - */ - type?: string; - } export interface Schema$OrderRefund { /** * The actor that created the refund. @@ -2050,10 +2050,10 @@ export namespace content_v2sandbox { */ predefinedDeliveryAddress?: string; /** - * The details of the merchant provided promotions applied to the order. - * More details about the program are here. + * Deprecated. The details of the merchant provided promotions applied to + * the order. More details about the program are here. */ - promotions?: Schema$OrderPromotion[]; + promotions?: Schema$OrderLegacyPromotion[]; /** * The total cost of shipping for all items. */ diff --git a/src/apis/dataflow/v1b3.ts b/src/apis/dataflow/v1b3.ts index 77fd6bb5a39..48b04b489bc 100644 --- a/src/apis/dataflow/v1b3.ts +++ b/src/apis/dataflow/v1b3.ts @@ -1406,6 +1406,11 @@ export namespace dataflow_v1b3 { * list before any instructions which depends on its output. */ export interface Schema$MapTask { + /** + * Counter prefix that can be used to prefix counters. Not currently used in + * Dataflow. + */ + counterPrefix?: string; /** * The instructions in the MapTask. */ diff --git a/src/apis/dataproc/v1.ts b/src/apis/dataproc/v1.ts index 2e4b718019c..ed62d18e7fa 100644 --- a/src/apis/dataproc/v1.ts +++ b/src/apis/dataproc/v1.ts @@ -1523,6 +1523,10 @@ export namespace dataproc_v1 { * Output only. The delete cluster operation metadata. */ deleteCluster?: Schema$ClusterOperation; + /** + * Output only. Workflow end time. + */ + endTime?: string; /** * Output only. The workflow graph. */ @@ -1531,6 +1535,10 @@ export namespace dataproc_v1 { * Map from parameter names to values that were used for those parameters. */ parameters?: any; + /** + * Output only. Workflow start time. + */ + startTime?: string; /** * Output only. The workflow state. */ diff --git a/src/apis/dataproc/v1beta2.ts b/src/apis/dataproc/v1beta2.ts index b3d9eea627a..81214eee81e 100644 --- a/src/apis/dataproc/v1beta2.ts +++ b/src/apis/dataproc/v1beta2.ts @@ -847,7 +847,7 @@ export namespace dataproc_v1beta2 { substate?: string; } /** - * Specifies the cluster auto delete related schedule configuration. + * Specifies the cluster auto-delete schedule configuration. */ export interface Schema$LifecycleConfig { /** @@ -855,14 +855,16 @@ export namespace dataproc_v1beta2 { */ autoDeleteTime?: string; /** - * Optional. The life duration of cluster, the cluster will be auto-deleted - * at the end of this duration. + * Optional. The lifetime duration of cluster. The cluster will be + * auto-deleted at the end of this period. Valid range: 10m, 14d.Example: + * "1d", to delete the cluster 1 day after its creation.. */ autoDeleteTtl?: string; /** - * Optional. The longest duration that cluster would keep alive while - * staying idle; passing this threshold will cause cluster to be - * auto-deleted. + * Optional. The duration to keep the cluster alive while idling. Passing + * this threshold will cause the cluster to be deleted. Valid range: 10m, + * 14d.Example: "10m", the minimum value, to delete the cluster + * when it has had no jobs running for 10 minutes. */ idleDeleteTtl?: string; } @@ -1562,6 +1564,10 @@ export namespace dataproc_v1beta2 { * Output only. The delete cluster operation metadata. */ deleteCluster?: Schema$ClusterOperation; + /** + * Output only. Workflow end time. + */ + endTime?: string; /** * Output only. The workflow graph. */ @@ -1570,6 +1576,10 @@ export namespace dataproc_v1beta2 { * Map from parameter names to values that were used for those parameters. */ parameters?: any; + /** + * Output only. Workflow start time. + */ + startTime?: string; /** * Output only. The workflow state. */ diff --git a/src/apis/datastore/v1.ts b/src/apis/datastore/v1.ts index 8ad2613c2b5..acd19b1535d 100644 --- a/src/apis/datastore/v1.ts +++ b/src/apis/datastore/v1.ts @@ -90,8 +90,8 @@ export namespace datastore_v1 { */ export interface Schema$ArrayValue { /** - * Values in the array. The order of this array may not be preserved if it - * contains a mix of indexed and unindexed values. + * Values in the array. The order of values in an array is preserved as long + * as all values have identical settings for 'exclude_from_indexes'. */ values?: Schema$Value[]; } diff --git a/src/apis/datastore/v1beta3.ts b/src/apis/datastore/v1beta3.ts index b9dadceade8..71d00883a67 100644 --- a/src/apis/datastore/v1beta3.ts +++ b/src/apis/datastore/v1beta3.ts @@ -90,8 +90,8 @@ export namespace datastore_v1beta3 { */ export interface Schema$ArrayValue { /** - * Values in the array. The order of this array may not be preserved if it - * contains a mix of indexed and unindexed values. + * Values in the array. The order of values in an array is preserved as long + * as all values have identical settings for 'exclude_from_indexes'. */ values?: Schema$Value[]; } diff --git a/src/apis/dialogflow/v2beta1.ts b/src/apis/dialogflow/v2beta1.ts index c82f53d861b..9bb32913c7e 100644 --- a/src/apis/dialogflow/v2beta1.ts +++ b/src/apis/dialogflow/v2beta1.ts @@ -83,6 +83,11 @@ export namespace dialogflow_v2beta1 { */ intents?: Schema$GoogleCloudDialogflowV2Intent[]; } + /** + * The request message for Conversations.AddConversationPhoneNumber. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AddConversationPhoneNumberRequest { + } /** * Represents a conversational agent. */ @@ -144,6 +149,85 @@ export namespace dialogflow_v2beta1 { */ timeZone?: string; } + /** + * The request message for Conversations.AnalyzeContent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnalyzeContentRequest { + /** + * The natural language speech audio to be processed. + */ + audio?: Schema$GoogleCloudDialogflowV2beta1InputAudio; + /** + * Optional. Instructs the speech synthesizer how to generate the output + * audio. + */ + replyAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + /** + * The natural language text to be processed. + */ + text?: Schema$GoogleCloudDialogflowV2beta1InputText; + } + /** + * The response message for Conversations.AnalyzeContent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse { + /** + * Optional. Only set if a Dialogflow automated agent has responded. + */ + automatedAgentReply?: + Schema$GoogleCloudDialogflowV2beta1AutomatedAgentReply; + /** + * Optional. The audio data bytes encoded as specified in the request. This + * field is set if: - `reply_audio_config` was specified in the request, or + * - The automated agent responded with audio to play to the user. In such + * case, `reply_audio.config` contains settings used to synthesize the + * speech. + */ + replyAudio?: Schema$GoogleCloudDialogflowV2beta1OutputAudio; + /** + * Output only. The output text content. This field is set if the automated + * agent responded with text to show to the user. + */ + replyText?: string; + } + /** + * Defines article suggestions that a human agent assistant can provide. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ArticleSuggestionConfig { + /** + * Required. Settings for knowledge base, Format: `projects/<Project + * ID>/knowledgeBases/<Knowledge Base ID>`. + */ + knowledgeBaseName?: string; + } + /** + * Defines the Automated Agent to connect to a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AutomatedAgentConfig { + /** + * Required. ID of the Dialogflow agent environment to use. This project + * needs to either be the same project as the conversation or you need to + * grant `service-<Conversation Project + * Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API + * Service Agent` role in this project. Format: `projects/<Project + * ID>/agent/environments/<Environment ID or '-'>` If + * environment is not specified, the default `draft` environment is used. + * Refer to + * [DetectIntentRequest](/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.DetectIntentRequest) + * for more details. + */ + agent?: string; + } + /** + * Represent a response from an automated agent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AutomatedAgentReply { + /** + * Required. Response of the Dialogflow Sessions.DetectIntent call. + */ + detectIntentResponse?: + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse; + } /** * The request message for EntityTypes.BatchCreateEntities. */ @@ -295,6 +379,34 @@ export namespace dialogflow_v2beta1 { */ intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; } + /** + * The request message for PhoneNumberOrders.CancelPhoneNumberOrder. + */ + export interface Schema$GoogleCloudDialogflowV2beta1CancelPhoneNumberOrderRequest { + } + /** + * The request message for HumanAgentAssistants.RequestCompileSuggestions. + */ + export interface Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsRequest { + /** + * Required. List of messages in a conversation in chronological order. + */ + messages?: Schema$GoogleCloudDialogflowV2beta1Message[]; + } + /** + * The response message for HumanAgentAssistants.RequestCompileSuggestions + */ + export interface Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse { + /** + * Required. + */ + suggestions?: Schema$GoogleCloudDialogflowV2beta1Suggestion[]; + } + /** + * The request message for Conversations.CompleteConversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1CompleteConversationRequest { + } /** * Represents a context. */ @@ -324,6 +436,86 @@ export namespace dialogflow_v2beta1 { */ parameters?: any; } + /** + * Represents a conversation. A conversation is an interaction between an + * agent, including live agents and Dialogflow agents, and a support customer. + * Conversations can include phone calls and text-based chat sessions. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Conversation { + /** + * Required. The Conversation Profile to be used to configure this + * Conversation. This field cannot be updated. Format: `projects/<Project + * ID>/conversationProfiles/<Conversation Profile ID>`. + */ + conversationProfile?: string; + /** + * Output only. The time the conversation was finished. + */ + endTime?: string; + /** + * Output only. The current state of the Conversation. + */ + lifecycleState?: string; + /** + * The unique identifier of this conversation. Required for all methods + * except `create` (`create` populates the name automatically). Format: + * `projects/<Project ID>/conversations/<Conversation ID>`. + */ + name?: string; + /** + * Output only. Required if the conversation is to be connected over + * telephony. + */ + phoneNumber?: Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber; + /** + * Output only. The time the conversation was started. + */ + startTime?: string; + } + /** + * Represents a phone number for telephony integration. It allows for + * connecting a particular conversation over telephony. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber { + /** + * Output only. The phone number to connect to this conversation. + */ + phoneNumber?: string; + } + /** + * Defines the services to connect to incoming Dialogflow conversations. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ConversationProfile { + /** + * Optional. Configuration for an automated agent to use with this profile. + */ + automatedAgentConfig?: + Schema$GoogleCloudDialogflowV2beta1AutomatedAgentConfig; + /** + * Required. Human readable name for this profile. Max length 1024 bytes. + */ + displayName?: string; + /** + * Optional. Configuration for agent assistance to use with this profile. + */ + humanAgentAssistantConfig?: + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig; + /** + * Optional. Configuration for logging conversation lifecycle events. + */ + loggingConfig?: Schema$GoogleCloudDialogflowV2beta1LoggingConfig; + /** + * Required for all methods except `create` (`create` populates the name + * automatically). The unique identifier of this conversation profile. + * Format: `projects/<Project + * ID>/conversationProfiles/<Conversation Profile ID>`. + */ + name?: string; + /** + * Optional. Configuration for publishing conversation lifecycle events. + */ + notificationConfig?: Schema$GoogleCloudDialogflowV2beta1NotificationConfig; + } /** * The request to detect user's intent. */ @@ -394,7 +586,9 @@ export namespace dialogflow_v2beta1 { webhookStatus?: Schema$GoogleRpcStatus; } /** - * A document resource. + * A document resource. Note: resource + * `projects.agent.knowledgeBases.documents` is deprecated, please use + * `projects.knowledgeBases.documents` instead. */ export interface Schema$GoogleCloudDialogflowV2beta1Document { /** @@ -450,7 +644,7 @@ export namespace dialogflow_v2beta1 { */ autoExpansionMode?: string; /** - * Required. The name of the entity. + * Required. The name of the entity type. */ displayName?: string; /** @@ -553,6 +747,57 @@ export namespace dialogflow_v2beta1 { */ agentUri?: string; } + /** + * Defines FAQ responses that a human agent assistant can provide. + */ + export interface Schema$GoogleCloudDialogflowV2beta1FaqAnswersConfig { + /** + * Required. Settings for knowledge base, Format: `projects/<Project + * ID>/knowledgeBases/<Knowledge Base ID>`. + */ + knowledgeBaseName?: string; + /** + * Optional. Maximum number of results to return. If unset, defaults to 10. + */ + maxResults?: number; + } + /** + * Represents a human agent assistant that provides suggestions to help human + * agents to resolve customer issues. This defines the types of content that + * the human agent assistant can present to a human agent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant { + /** + * Optional. Settings for article suggestion. + */ + articleSuggestionConfig?: + Schema$GoogleCloudDialogflowV2beta1ArticleSuggestionConfig; + /** + * Optional. Settings for knowledge service. + */ + faqAnswersConfig?: Schema$GoogleCloudDialogflowV2beta1FaqAnswersConfig; + /** + * Required for all methods except `create` (`create` populates the name + * automatically). The unique identifier of human agent assistant. Format: + * `projects/<Project ID>/humanAgentAssistants/<Human Agent + * Assistant ID>`. + */ + name?: string; + } + /** + * Defines the Human Agent Assistant to connect to a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig { + /** + * Required. ID of the agent assistant to use. Format: `projects/<Project + * ID>/humanAgentAssistants/<Human Agent Assistant ID>`. + */ + name?: string; + /** + * Optional. Pub/Sub topic on which to publish new agent assistant events. + */ + notificationConfig?: Schema$GoogleCloudDialogflowV2beta1NotificationConfig; + } /** * The request message for Agents.ImportAgent. */ @@ -575,6 +820,22 @@ export namespace dialogflow_v2beta1 { */ agentUri?: string; } + /** + * Represents the natural language speech audio to be processed. + */ + export interface Schema$GoogleCloudDialogflowV2beta1InputAudio { + /** + * Required. The natural language speech audio to be processed. A single + * request can contain up to 1 minute of speech audio data. The transcribed + * text cannot contain more than 256 bytes. + */ + audio?: string; + /** + * Required. Instructs the speech recognizer how to process the speech + * audio. + */ + config?: Schema$GoogleCloudDialogflowV2beta1InputAudioConfig; + } /** * Instructs the speech recognizer how to process the audio content. */ @@ -618,6 +879,33 @@ export namespace dialogflow_v2beta1 { */ sampleRateHertz?: number; } + /** + * Represents the natural language text to be processed. + */ + export interface Schema$GoogleCloudDialogflowV2beta1InputText { + /** + * Required. The language of this conversational query. See [Language + * Support](https://dialogflow.com/docs/languages) for a list of the + * currently supported language codes. + */ + languageCode?: string; + /** + * Required. The UTF-8 encoded natural language text to be processed. Text + * length must not exceed 256 bytes. + */ + text?: string; + } + /** + * Defines the language used in the input text. + */ + export interface Schema$GoogleCloudDialogflowV2beta1InputTextConfig { + /** + * Required. The language of this conversational query. See [Language + * Support](https://dialogflow.com/docs/languages) for a list of the + * currently supported language codes. + */ + languageCode?: string; + } /** * Represents an intent. Intents convert a number of user expressions or * patterns into an action. An action is an extraction of a user command or @@ -1301,7 +1589,9 @@ export namespace dialogflow_v2beta1 { source?: string; } /** - * Represents knowledge base resource. + * Represents knowledge base resource. Note: resource + * `projects.agent.knowledgeBases` is deprecated, please use + * `projects.knowledgeBases` instead. */ export interface Schema$GoogleCloudDialogflowV2beta1KnowledgeBase { /** @@ -1340,6 +1630,37 @@ export namespace dialogflow_v2beta1 { */ nextPageToken?: string; } + /** + * The response message for ConversationProfiles.ListConversationProfiles. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse { + /** + * The list of project conversation profiles. There is a maximum number of + * items returned based on the page_size field in the request. + */ + conversationProfiles?: + Schema$GoogleCloudDialogflowV2beta1ConversationProfile[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + */ + nextPageToken?: string; + } + /** + * The response message for Conversations.ListConversations. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse { + /** + * The list of conversations. There will be a maximum number of items + * returned based on the page_size field in the request. + */ + conversations?: Schema$GoogleCloudDialogflowV2beta1Conversation[]; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + */ + nextPageToken?: string; + } /** * Response message for Documents.ListDocuments. */ @@ -1369,6 +1690,22 @@ export namespace dialogflow_v2beta1 { */ nextPageToken?: string; } + /** + * The response message for HumanAgentAssistants.ListHumanAgentAssistants. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse { + /** + * The list of project agent assistants. There is a maximum number of items + * returned based on the page_size field in the request. + */ + humanAgentAssistants?: + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant[]; + /** + * Token to retrieve the next page of results or empty if there are no more + * results in the list. + */ + nextPageToken?: string; + } /** * The response message for Intents.ListIntents. */ @@ -1398,6 +1735,66 @@ export namespace dialogflow_v2beta1 { */ nextPageToken?: string; } + /** + * The response message for Conversations.ListMessages. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse { + /** + * Required. The list of messages. There will be a maximum number of items + * returned based on the page_size field in the request. + */ + messages?: Schema$GoogleCloudDialogflowV2beta1Message[]; + /** + * Optional. Token to retrieve the next page of results, or empty if there + * are no more results in the list. + */ + nextPageToken?: string; + } + /** + * The response message for Conversations.ListParticipants. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse { + /** + * Token to retrieve the next page of results or empty if there are no more + * results in the list. + */ + nextPageToken?: string; + /** + * The list of participants. There is a maximum number of items returned + * based on the page_size field in the request. + */ + participants?: Schema$GoogleCloudDialogflowV2beta1Participant[]; + } + /** + * The response message for PhoneNumberOrders.ListPhoneNumberOrders. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse { + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + */ + nextPageToken?: string; + /** + * The list of orders. There is a maximum number of items returned based on + * the page_size field in the request. + */ + phoneNumberOrders?: Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder[]; + } + /** + * The response message for PhoneNumbers.ListPhoneNumbers. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse { + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + */ + nextPageToken?: string; + /** + * The list of `PhoneNumber` resources. There is a maximum number of items + * returned based on the page_size field in the request. + */ + phoneNumbers?: Schema$GoogleCloudDialogflowV2beta1PhoneNumber[]; + } /** * The response message for SessionEntityTypes.ListSessionEntityTypes. */ @@ -1413,6 +1810,74 @@ export namespace dialogflow_v2beta1 { */ sessionEntityTypes?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType[]; } + /** + * The response message for [Conversations.ListSuggestions] + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse { + /** + * Optional. Token to retrieve the next page of results or empty if there + * are no more results in the list. + */ + nextPageToken?: string; + /** + * Required. + */ + suggestions?: Schema$GoogleCloudDialogflowV2beta1Suggestion[]; + } + /** + * Defines logging behavior for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2beta1LoggingConfig {} + /** + * Represents a message posted into a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Message { + /** + * Required. The message content. + */ + content?: string; + /** + * Optional. The time when the message was sent. + */ + createTime?: string; + /** + * Required. The message language. This should be a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + */ + languageCode?: string; + /** + * Required. The unique identifier of the message. Format: + * `projects/<Project ID>/conversations/<Conversation + * ID>/messages/<Message ID>`. + */ + name?: string; + /** + * Required. The participant that said this message. + */ + participant?: string; + /** + * Optional. The role of the participant. + */ + participantRole?: string; + } + /** + * Defines notification behavior for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2beta1NotificationConfig { + /** + * Optional. Name of the Cloud Pub/Sub topic to publish conversation events + * like CONVERSATION_STARTED as serialized ConversationEvent protos. If + * enable_notifications is `true` and no topic is supplied, a new topic is + * created and listed here. Notification works for phone calls, if this + * topic either is in the same project as the conversation or you grant + * `service-<Conversation Project + * Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow + * Service Agent` role in the topic project. Format: `projects/<Project + * ID>/topics/<Topic ID>`. + */ + topic?: string; + } /** * Represents the contents of the original request that was passed to the * `[Streaming]DetectIntent` call. @@ -1442,7 +1907,21 @@ export namespace dialogflow_v2beta1 { version?: string; } /** - * Instructs the speech synthesizer how to generate the output audio content. + * Represents the natural language speech audio to be played to the end user. + */ + export interface Schema$GoogleCloudDialogflowV2beta1OutputAudio { + /** + * Required. The natural language speech audio. + */ + audio?: string; + /** + * Required. Instructs the speech synthesizer how to generate the speech + * audio. + */ + config?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + } + /** + * Instructs the speech synthesizer how to generate the output audio content. */ export interface Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig { /** @@ -1463,6 +1942,107 @@ export namespace dialogflow_v2beta1 { synthesizeSpeechConfig?: Schema$GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig; } + /** + * Represents a single side of the conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Participant { + /** + * Required. The unique identifier of this participant. Format: + * `projects/<Project ID>/conversations/<Conversation + * ID>/participants/<Participant ID>`. + */ + name?: string; + /** + * Required. The role this participant plays in the conversation. + */ + role?: string; + } + /** + * Represents a phone number. `PhoneNumber` resources enable phone calls to be + * answered by Dialogflow services and are added to a project through a + * `PhoneNumberOrder`. + */ + export interface Schema$GoogleCloudDialogflowV2beta1PhoneNumber { + /** + * Optional. The conversation profile calls to this `PhoneNumber` should + * use. Format: `projects/<Project + * ID>/conversationProfiles/<ConversationProfile ID>`. + */ + conversationProfile?: string; + /** + * Output only. The state of the `PhoneNumber`. Defaults to `ACTIVE`. + * `PhoneNumber` objects set to `DELETE_REQUESTED` always decline incoming + * calls and can be removed completely within 30 days. + */ + lifecycleState?: string; + /** + * Required. The unique identifier of this phone number. Format: + * `projects/<Project ID>/phoneNumbers/<PhoneNumber ID>`. + */ + name?: string; + /** + * Output only. Phone number in [E.164](https://en.wikipedia.org/wiki/E.164) + * format. An example of a correctly formatted phone number: +15556767888. + */ + phoneNumber?: string; + } + /** + * Represents a phone number order. Orders can assign phone numbers to + * projects. + */ + export interface Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder { + /** + * Output only. The time this order was created. + */ + createTime?: string; + /** + * Optional. A description of the order, limit is 1024 bytes. + */ + description?: string; + /** + * Output only. The current status of the order. + */ + lifecycleState?: string; + /** + * Required. The unique identifier of this order. Format: + * `projects/<Project ID>/phoneNumberOrders/<Order ID>`. + */ + name?: string; + /** + * Output only. A map of ordered numbers filled so far, keyed by their + * resource name. Key format: `projects/<Project + * ID>/phoneNumbers/<PhoneNumber ID>`. Value format: E.164 phone + * number. Output only. + */ + phoneNumbers?: any; + /** + * Order is for new numbers. + */ + phoneNumberSpec?: Schema$GoogleCloudDialogflowV2beta1PhoneNumberSpec; + /** + * Output only. The time this order was last updated. + */ + updateTime?: string; + } + /** + * Request for new numbers fitting a set of parameters. The country code for + * newly requested numbers defaults to 1 (US) until the service is available + * in other regions. + */ + export interface Schema$GoogleCloudDialogflowV2beta1PhoneNumberSpec { + /** + * Required. Total numbers requested, between 1 and 10 inclusive. + */ + count?: number; + /** + * Optional. Area codes to use. An empty list means 'any code'. Each + * value is treated as equally preferred. Each entry has a limit of 10 + * bytes. "area code" corresponds to "National Destination + * Code" described in [E.164](https://en.wikipedia.org/wiki/E.164) + * standard. + */ + preferredAreaCodes?: string[]; + } /** * Represents the query input. It can contain either: 1. An audio config * which instructs the speech recognizer how to process the speech audio. @@ -1520,9 +2100,9 @@ export namespace dialogflow_v2beta1 { sentimentAnalysisRequestConfig?: Schema$GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig; /** - * Optional. The collection of session entity types to replace or extend - * developer entities with for this query only. The entity synonyms apply to - * all languages. + * Optional. Additional session entity types to replace or extend developer + * entity types with. The entity synonyms apply to all languages and persist + * for the session of this query. */ sessionEntityTypes?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType[]; /** @@ -1732,10 +2312,210 @@ export namespace dialogflow_v2beta1 { * ID>/users/<User ID>/sessions/<Session * ID>/entityTypes/<Entity Type Display Name>`. If `Environment ID` * is not specified, we assume default 'draft' environment. If `User - * ID` is not specified, we assume default '-' user. + * ID` is not specified, we assume default '-' user. `<Entity + * Type Display Name>` must be the display name of an existing entity + * type in the same agent that will be overridden or supplemented. + */ + name?: string; + } + /** + * The top-level message sent by the client to the `StreamingAnalyzeContent` + * method. Multiple request messages must be sent in the following order: 1. + * The first message must contain `participant` and `config` fields. To + * receive an audio response, the first message must also contain the + * `reply_audio_config` field. The first message must not contain `input`. 2. + * All subsequent messages must contain only input data. Specifically: - + * If the `config` in the first message was set to `audio_config`, then all + * subsequent messages must contain only `input_audio`. It is a good practice + * to split the input audio into short chunks and deliver each chunk in + * a separate message. - If the `config` in the first message was set to + * `text_config`, then the second message must contain only + * `input_text`. Moreover, the `input_text` field can be only sent once. + * After all input is delivered, the client must half-close, or abort the + * request stream. + */ + export interface Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentRequest { + /** + * Instructs the speech recognizer how to process the speech audio. + */ + audioConfig?: Schema$GoogleCloudDialogflowV2beta1InputAudioConfig; + /** + * The input audio content to be recognized. Must be sent if `audio_config` + * is set in the first message. The complete audio over all streaming + * messages must not exceed 1 minute. + */ + inputAudio?: string; + /** + * The UTF-8 encoded natural language text to be processed. Must be sent if + * `text_config` is set in the first message. Text length must not exceed + * 256 bytes. The `input_text` field can be only sent once. + */ + inputText?: string; + /** + * Optional. Instructs the speech synthesizer how to generate the output + * audio. + */ + replyAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + /** + * The natural language text to be processed. + */ + textConfig?: Schema$GoogleCloudDialogflowV2beta1InputTextConfig; + } + /** + * The top-level message returned from the `StreamingAnalyzeContent` method. + * Multiple response messages can be returned in order: 1. If the input was + * set to streaming audio, the first one or more messages contain + * `recognition_result`. Each `recognition_result` represents a more complete + * transcript of what the user said. The last `recognition_result` has + * `is_final` set to `true`. 2. The next message contains `reply_text` and + * optionally `reply_audio` returned by an agent. This message may also + * contain `automated_agent_reply`. + */ + export interface Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse { + /** + * Optional. Only set if a Dialogflow automated agent has responded. + */ + automatedAgentReply?: + Schema$GoogleCloudDialogflowV2beta1AutomatedAgentReply; + /** + * The result of speech recognition. + */ + recognitionResult?: + Schema$GoogleCloudDialogflowV2beta1StreamingRecognitionResult; + /** + * Optional. The audio data bytes encoded as specified in the request. This + * field is set if: - The `reply_audio_config` field is specified in the + * request. - The automated agent, which this output comes from, responded + * with audio. In such case, the `reply_audio.config` field contains + * settings used to synthesize the speech. + */ + replyAudio?: Schema$GoogleCloudDialogflowV2beta1OutputAudio; + /** + * Optional. The output text content. This field is set if an automated + * agent responded with a text for the user. + */ + replyText?: string; + } + /** + * Contains a speech recognition result corresponding to a portion of the + * audio that is currently being processed or an indication that this is the + * end of the single requested utterance. Example: 1. transcript: + * "tube" 2. transcript: "to be a" 3. transcript: + * "to be" 4. transcript: "to be or not to be" is_final: + * true 5. transcript: " that's" 6. transcript: " that + * is" 7. recognition_event_type: + * `RECOGNITION_EVENT_END_OF_SINGLE_UTTERANCE` 8. transcript: " that is + * the question" is_final: true Only two of the responses contain + * final results (#4 and #8 indicated by `is_final: true`). Concatenating + * these generates the full transcript: "to be or not to be that is the + * question". In each response we populate: * for + * `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`. * for + * `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `event_type`. + */ + export interface Schema$GoogleCloudDialogflowV2beta1StreamingRecognitionResult { + /** + * The Speech confidence between 0.0 and 1.0 for the current portion of + * audio. A higher number indicates an estimated greater likelihood that the + * recognized words are correct. The default of 0.0 is a sentinel value + * indicating that confidence was not set. This field is typically only + * provided if `is_final` is true and you should not rely on it being + * accurate or even set. + */ + confidence?: number; + /** + * The default of 0.0 is a sentinel value indicating `confidence` was not + * set. If `false`, the `StreamingRecognitionResult` represents an interim + * result that may change. If `true`, the recognizer will not return any + * further hypotheses about this piece of the audio. May only be populated + * for `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`. + */ + isFinal?: boolean; + /** + * Type of the result message. + */ + messageType?: string; + /** + * Transcript text representing the words that the user spoke. Populated if + * and only if `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`. + */ + transcript?: string; + } + /** + * Represents a suggestion for a human agent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Suggestion { + /** + * Output only. Articles ordered by score in descending order. + */ + articles?: Schema$GoogleCloudDialogflowV2beta1SuggestionArticle[]; + /** + * Output only. The time the suggestion was created. + */ + createTime?: string; + /** + * Optional. Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2beta1SuggestionFaqAnswer[]; + /** + * Output only. The name of this suggestion. Format: `projects/<Project + * ID>/conversations/<Conversation + * ID>/participants/x/suggestions/<Suggestion ID>`. */ name?: string; } + /** + * Represents suggested article. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionArticle { + /** + * Output only. A map that contains metadata about the answer and the + * document from which it originates. + */ + metadata?: any; + /** + * Output only. Article snippets. + */ + snippets?: string[]; + /** + * Output only. The article title. + */ + title?: string; + /** + * Output only. The article URI. + */ + uri?: string; + } + /** + * Represents suggested answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionFaqAnswer { + /** + * Output only. The piece of text from the `source` knowledge base document. + */ + answer?: string; + /** + * The system's confidence score that this Knowledge answer is a good + * match for this conversational query, range from 0.0 (completely + * uncertain) to 1.0 (completely certain). + */ + confidence?: number; + /** + * Output only. A map that contains metadata about the answer and the + * document from which it originates. + */ + metadata?: any; + /** + * Output only. The corresponding FAQ question. + */ + question?: string; + /** + * Output only. Indicates which Knowledge Document this answer was extracted + * from. Format: `projects/<Project + * ID>/agent/knowledgeBases/<Knowledge Base + * ID>/documents/<Document ID>`. + */ + source?: string; + } /** * Configuration of how speech should be synthesized. */ @@ -1796,6 +2576,11 @@ export namespace dialogflow_v2beta1 { * The request message for Agents.TrainAgent. */ export interface Schema$GoogleCloudDialogflowV2beta1TrainAgentRequest {} + /** + * The request message for PhoneNumbers.UndeletePhoneNumber. + */ + export interface Schema$GoogleCloudDialogflowV2beta1UndeletePhoneNumberRequest { + } /** * Description of which voice to use for speech synthesis. */ @@ -1902,7 +2687,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The number of conversational query requests after which the * context expires. If set to `0` (the default) the context expires - * immediately. Contexts expire automatically after 10 minutes even if there + * immediately. Contexts expire automatically after 20 minutes even if there * are no matching queries. */ lifespanCount?: number; @@ -1930,7 +2715,7 @@ export namespace dialogflow_v2beta1 { */ autoExpansionMode?: string; /** - * Required. The name of the entity. + * Required. The name of the entity type. */ displayName?: string; /** @@ -2861,16 +3646,28 @@ export namespace dialogflow_v2beta1 { export class Resource$Projects { root: Dialogflow; agent: Resource$Projects$Agent; + conversationProfiles: Resource$Projects$Conversationprofiles; conversations: Resource$Projects$Conversations; + environments: Resource$Projects$Environments; + humanAgentAssistants: Resource$Projects$Humanagentassistants; knowledgeBases: Resource$Projects$Knowledgebases; operations: Resource$Projects$Operations; + phoneNumberOrders: Resource$Projects$Phonenumberorders; + phoneNumbers: Resource$Projects$Phonenumbers; constructor(root: Dialogflow) { this.root = root; this.getRoot.bind(this); this.agent = new Resource$Projects$Agent(root); + this.conversationProfiles = + new Resource$Projects$Conversationprofiles(root); this.conversations = new Resource$Projects$Conversations(root); + this.environments = new Resource$Projects$Environments(root); + this.humanAgentAssistants = + new Resource$Projects$Humanagentassistants(root); this.knowledgeBases = new Resource$Projects$Knowledgebases(root); this.operations = new Resource$Projects$Operations(root); + this.phoneNumberOrders = new Resource$Projects$Phonenumberorders(root); + this.phoneNumbers = new Resource$Projects$Phonenumbers(root); } getRoot() { @@ -4694,7 +5491,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.environments.users.sessions.contexts.create - * @desc Creates a context. + * @desc Creates a context. If the specified context already exists, + * overrides the context. * @alias * dialogflow.projects.agent.environments.users.sessions.contexts.create * @memberOf! () @@ -5218,7 +6016,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.environments.users.sessions.entityTypes.create - * @desc Creates a session entity type. + * @desc Creates a session entity type. If the specified session entity + * type already exists, overrides the session entity type. * @alias * dialogflow.projects.agent.environments.users.sessions.entityTypes.create * @memberOf! () @@ -5548,7 +6347,7 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {string} params.name Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. * @param {string=} params.updateMask Optional. The mask to control which fields get updated. * @param {().GoogleCloudDialogflowV2beta1SessionEntityType} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -5716,7 +6515,9 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall * ID>/agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not * specified, we assume default 'draft' environment. If `User ID` is not - * specified, we assume default '-' user. + * specified, we assume default '-' user. `` must + * be the display name of an existing entity type in the same agent that + * will be overridden or supplemented. */ name?: string; /** @@ -7441,7 +8242,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.sessions.contexts.create - * @desc Creates a context. + * @desc Creates a context. If the specified context already exists, + * overrides the context. * @alias dialogflow.projects.agent.sessions.contexts.create * @memberOf! () * @@ -7940,7 +8742,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * dialogflow.projects.agent.sessions.entityTypes.create - * @desc Creates a session entity type. + * @desc Creates a session entity type. If the specified session entity + * type already exists, overrides the session entity type. * @alias dialogflow.projects.agent.sessions.entityTypes.create * @memberOf! () * @@ -8251,7 +9054,7 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {string} params.name Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. * @param {string=} params.updateMask Optional. The mask to control which fields get updated. * @param {().GoogleCloudDialogflowV2beta1SessionEntityType} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -8416,7 +9219,9 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall * ID>/agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not * specified, we assume default 'draft' environment. If `User ID` is not - * specified, we assume default '-' user. + * specified, we assume default '-' user. `` must + * be the display name of an existing entity type in the same agent that + * will be overridden or supplemented. */ name?: string; /** @@ -8432,13 +9237,11 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall - export class Resource$Projects$Conversations { + export class Resource$Projects$Conversationprofiles { root: Dialogflow; - contexts: Resource$Projects$Conversations$Contexts; constructor(root: Dialogflow) { this.root = root; this.getRoot.bind(this); - this.contexts = new Resource$Projects$Conversations$Contexts(root); } getRoot() { @@ -8447,44 +9250,50 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** - * dialogflow.projects.conversations.deleteContexts - * @desc Deletes all active contexts in the specified session. - * @alias dialogflow.projects.conversations.deleteContexts + * dialogflow.projects.conversationProfiles.create + * @desc Creates a conversation profile in the specified project. + * @alias dialogflow.projects.conversationProfiles.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {string} params.parent Required. The project to create a conversation profile for. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1ConversationProfile} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - deleteContexts( - params?: Params$Resource$Projects$Conversations$Deletecontexts, - options?: MethodOptions): AxiosPromise; - deleteContexts( - params: Params$Resource$Projects$Conversations$Deletecontexts, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - deleteContexts( - params: Params$Resource$Projects$Conversations$Deletecontexts, - callback: BodyResponseCallback): void; - deleteContexts(callback: BodyResponseCallback): - void; - deleteContexts( - paramsOrCallback?: - Params$Resource$Projects$Conversations$Deletecontexts| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + create( + params?: Params$Resource$Projects$Conversationprofiles$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Conversationprofiles$Create, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; + create( + params: Params$Resource$Projects$Conversationprofiles$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; + create(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; + create( + paramsOrCallback?: Params$Resource$Projects$Conversationprofiles$Create| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void| + AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Conversations$Deletecontexts; + Params$Resource$Projects$Conversationprofiles$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Conversations$Deletecontexts; + params = {} as Params$Resource$Projects$Conversationprofiles$Create; options = {}; } @@ -8497,9 +9306,9 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts') + url: (rootUrl + '/v2beta1/{+parent}/conversationProfiles') .replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + method: 'POST' }, options), params, @@ -8508,90 +9317,53 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>( + parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>(parameters); } } - } - - export interface Params$Resource$Projects$Conversations$Deletecontexts { - /** - * Auth client or API Key for the request - */ - auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; - - /** - * Required. The name of the session to delete all contexts from. Format: - * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - } - - export class Resource$Projects$Conversations$Contexts { - root: Dialogflow; - constructor(root: Dialogflow) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } /** - * dialogflow.projects.conversations.contexts.create - * @desc Creates a context. - * @alias dialogflow.projects.conversations.contexts.create + * dialogflow.projects.conversationProfiles.delete + * @desc Deletes the specified conversation profile. + * @alias dialogflow.projects.conversationProfiles.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {().GoogleCloudDialogflowV2beta1Context} params.resource Request body data + * @param {string} params.name Required. The name of the conversation profile to delete. Format: `projects//conversationProfiles/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create( - params?: Params$Resource$Projects$Conversations$Contexts$Create, - options?: MethodOptions): - AxiosPromise; - create( - params: Params$Resource$Projects$Conversations$Contexts$Create, - options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; - create( - params: Params$Resource$Projects$Conversations$Contexts$Create, - callback: - BodyResponseCallback): - void; - create( - callback: - BodyResponseCallback): - void; - create( - paramsOrCallback?: - Params$Resource$Projects$Conversations$Contexts$Create| - BodyResponseCallback, + delete( + params?: Params$Resource$Projects$Conversationprofiles$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Conversationprofiles$Delete| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Conversations$Contexts$Create; + Params$Resource$Projects$Conversationprofiles$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Conversations$Contexts$Create; + params = {} as Params$Resource$Projects$Conversationprofiles$Delete; options = {}; } @@ -8604,78 +9376,8 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts') - .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' - }, - options), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context: this.getRoot() - }; - if (callback) { - createAPIRequest( - parameters, callback); - } else { - return createAPIRequest( - parameters); - } - } - - - /** - * dialogflow.projects.conversations.contexts.delete - * @desc Deletes the specified context. - * @alias dialogflow.projects.conversations.contexts.delete - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. - * @param {callback} callback The callback that handles the response. - * @return {object} Request object - */ - delete( - params?: Params$Resource$Projects$Conversations$Contexts$Delete, - options?: MethodOptions): AxiosPromise; - delete( - params: Params$Resource$Projects$Conversations$Contexts$Delete, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Projects$Conversations$Contexts$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: - Params$Resource$Projects$Conversations$Contexts$Delete| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Conversations$Contexts$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Conversations$Contexts$Delete; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' }, options), params, @@ -8692,47 +9394,45 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** - * dialogflow.projects.conversations.contexts.get - * @desc Retrieves the specified context. - * @alias dialogflow.projects.conversations.contexts.get + * dialogflow.projects.conversationProfiles.get + * @desc Retrieves the specified conversation profile. + * @alias dialogflow.projects.conversationProfiles.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {string} params.name Required. The resource name of the conversation profile. Format: `projects//conversationProfiles/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get(params?: Params$Resource$Projects$Conversations$Contexts$Get, + get(params?: Params$Resource$Projects$Conversationprofiles$Get, options?: MethodOptions): - AxiosPromise; - get(params: Params$Resource$Projects$Conversations$Contexts$Get, - options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; - get(params: Params$Resource$Projects$Conversations$Contexts$Get, - callback: - BodyResponseCallback): - void; - get(callback: - BodyResponseCallback): - void; - get(paramsOrCallback?: Params$Resource$Projects$Conversations$Contexts$Get| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { + AxiosPromise; + get(params: Params$Resource$Projects$Conversationprofiles$Get, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; + get(params: Params$Resource$Projects$Conversationprofiles$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; + get(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; + get(paramsOrCallback?: Params$Resource$Projects$Conversationprofiles$Get| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void| + AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Conversations$Contexts$Get; + Params$Resource$Projects$Conversationprofiles$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Conversations$Contexts$Get; + params = {} as Params$Resource$Projects$Conversationprofiles$Get; options = {}; } @@ -8755,61 +9455,68 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>( parameters, callback); } else { - return createAPIRequest( - parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>(parameters); } } /** - * dialogflow.projects.conversations.contexts.list - * @desc Returns the list of all contexts in the specified session. - * @alias dialogflow.projects.conversations.contexts.list + * dialogflow.projects.conversationProfiles.list + * @desc Returns the list of all conversation profiles in the specified + * project. + * @alias dialogflow.projects.conversationProfiles.list * @memberOf! () * * @param {object} params Parameters for request * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. - * @param {string} params.parent Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {string} params.parent Required. The project to list all conversation profiles from. Format: `projects/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ list( - params?: Params$Resource$Projects$Conversations$Contexts$List, + params?: Params$Resource$Projects$Conversationprofiles$List, options?: MethodOptions): - AxiosPromise; + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>; list( - params: Params$Resource$Projects$Conversations$Contexts$List, + params: Params$Resource$Projects$Conversationprofiles$List, options: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>): + void; list( - params: Params$Resource$Projects$Conversations$Contexts$List, + params: Params$Resource$Projects$Conversationprofiles$List, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>): + void; list(callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>): + void; list( - paramsOrCallback?: Params$Resource$Projects$Conversations$Contexts$List| + paramsOrCallback?: Params$Resource$Projects$Conversationprofiles$List| BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>, optionsOrCallback?: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void| - AxiosPromise { + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse> { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Conversations$Contexts$List; + Params$Resource$Projects$Conversationprofiles$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Conversations$Contexts$List; + params = {} as Params$Resource$Projects$Conversationprofiles$List; options = {}; } @@ -8822,7 +9529,7 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts') + url: (rootUrl + '/v2beta1/{+parent}/conversationProfiles') .replace(/([^:]\/)\/+/g, '$1'), method: 'GET' }, @@ -8834,65 +9541,62 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall }; if (callback) { createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>( + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>( parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>( + Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse>( parameters); } } /** - * dialogflow.projects.conversations.contexts.patch - * @desc Updates the specified context. - * @alias dialogflow.projects.conversations.contexts.patch + * dialogflow.projects.conversationProfiles.patch + * @desc Updates the specified conversation profile. + * @alias dialogflow.projects.conversationProfiles.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * @param {string=} params.updateMask Optional. The mask to control which fields get updated. - * @param {().GoogleCloudDialogflowV2beta1Context} params.resource Request body data + * @param {string} params.name Required for all methods except `create` (`create` populates the name automatically). The unique identifier of this conversation profile. Format: `projects//conversationProfiles/`. + * @param {string=} params.updateMask Required. The mask to control which fields to update. + * @param {().GoogleCloudDialogflowV2beta1ConversationProfile} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ patch( - params?: Params$Resource$Projects$Conversations$Contexts$Patch, + params?: Params$Resource$Projects$Conversationprofiles$Patch, options?: MethodOptions): - AxiosPromise; + AxiosPromise; patch( - params: Params$Resource$Projects$Conversations$Contexts$Patch, - options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; + params: Params$Resource$Projects$Conversationprofiles$Patch, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; patch( - params: Params$Resource$Projects$Conversations$Contexts$Patch, - callback: - BodyResponseCallback): - void; - patch(callback: - BodyResponseCallback): - void; + params: Params$Resource$Projects$Conversationprofiles$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; + patch(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void; patch( - paramsOrCallback?: - Params$Resource$Projects$Conversations$Contexts$Patch| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { + paramsOrCallback?: Params$Resource$Projects$Conversationprofiles$Patch| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>): void| + AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Conversations$Contexts$Patch; + Params$Resource$Projects$Conversationprofiles$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Conversations$Contexts$Patch; + params = {} as Params$Resource$Projects$Conversationprofiles$Patch; options = {}; } @@ -8915,68 +9619,58 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>( parameters, callback); } else { - return createAPIRequest( - parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ConversationProfile>(parameters); } } } - export interface Params$Resource$Projects$Conversations$Contexts$Create { + export interface Params$Resource$Projects$Conversationprofiles$Create { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. + * Required. The project to create a conversation profile for. Format: + * `projects/`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + requestBody?: Schema$GoogleCloudDialogflowV2beta1ConversationProfile; } - export interface Params$Resource$Projects$Conversations$Contexts$Delete { + export interface Params$Resource$Projects$Conversationprofiles$Delete { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or - * `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is - * not specified, we assume default 'draft' environment. If `User ID` is not - * specified, we assume default '-' user. + * Required. The name of the conversation profile to delete. Format: + * `projects//conversationProfiles/`. */ name?: string; } - export interface Params$Resource$Projects$Conversations$Contexts$Get { + export interface Params$Resource$Projects$Conversationprofiles$Get { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the context. Format: `projects//agent/sessions//contexts/` or - * `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is - * not specified, we assume default 'draft' environment. If `User ID` is not - * specified, we assume default '-' user. + * Required. The resource name of the conversation profile. Format: + * `projects//conversationProfiles/`. */ name?: string; } - export interface Params$Resource$Projects$Conversations$Contexts$List { + export interface Params$Resource$Projects$Conversationprofiles$List { /** * Auth client or API Key for the request */ @@ -8993,50 +9687,46 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall */ pageToken?: string; /** - * Required. The session to list all contexts from. Format: - * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' - * environment. If `User ID` is not specified, we assume default '-' user. + * Required. The project to list all conversation profiles from. Format: + * `projects/`. */ parent?: string; } - export interface Params$Resource$Projects$Conversations$Contexts$Patch { + export interface Params$Resource$Projects$Conversationprofiles$Patch { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The unique identifier of the context. Format: - * `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The - * `Context ID` is always converted to lowercase. If `Environment ID` is not - * specified, we assume default 'draft' environment. If `User ID` is not - * specified, we assume default '-' user. + * Required for all methods except `create` (`create` populates the name + * automatically). The unique identifier of this conversation profile. + * Format: `projects//conversationProfiles/`. */ name?: string; /** - * Optional. The mask to control which fields get updated. + * Required. The mask to control which fields to update. */ updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + requestBody?: Schema$GoogleCloudDialogflowV2beta1ConversationProfile; } - - export class Resource$Projects$Knowledgebases { + export class Resource$Projects$Conversations { root: Dialogflow; - documents: Resource$Projects$Knowledgebases$Documents; + messages: Resource$Projects$Conversations$Messages; + participants: Resource$Projects$Conversations$Participants; constructor(root: Dialogflow) { this.root = root; this.getRoot.bind(this); - this.documents = new Resource$Projects$Knowledgebases$Documents(root); + this.messages = new Resource$Projects$Conversations$Messages(root); + this.participants = + new Resource$Projects$Conversations$Participants(root); } getRoot() { @@ -9045,49 +9735,58 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** - * dialogflow.projects.knowledgeBases.create - * @desc Creates a knowledge base. - * @alias dialogflow.projects.knowledgeBases.create + * dialogflow.projects.conversations.addConversationPhoneNumber + * @desc Sets a phone number for this converstion to connect to. + * @alias dialogflow.projects.conversations.addConversationPhoneNumber * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The project to create a knowledge base for. Format: `projects/`. - * @param {().GoogleCloudDialogflowV2beta1KnowledgeBase} params.resource Request body data + * @param {string} params.name The name of this conversation. Format: `projects//conversations/`. + * @param {().GoogleCloudDialogflowV2beta1AddConversationPhoneNumberRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create( - params?: Params$Resource$Projects$Knowledgebases$Create, + addConversationPhoneNumber( + params?: + Params$Resource$Projects$Conversations$Addconversationphonenumber, options?: MethodOptions): - AxiosPromise; - create( - params: Params$Resource$Projects$Knowledgebases$Create, - options: MethodOptions| - BodyResponseCallback, + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>; + addConversationPhoneNumber( + params: + Params$Resource$Projects$Conversations$Addconversationphonenumber, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; - create( - params: Params$Resource$Projects$Knowledgebases$Create, + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>): void; + addConversationPhoneNumber( + params: + Params$Resource$Projects$Conversations$Addconversationphonenumber, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; - create(callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; - create( - paramsOrCallback?: Params$Resource$Projects$Knowledgebases$Create| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>): void; + addConversationPhoneNumber( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>): void; + addConversationPhoneNumber( + paramsOrCallback?: + Params$Resource$Projects$Conversations$Addconversationphonenumber| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): - void|AxiosPromise { + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber> { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$Create; + Params$Resource$Projects$Conversations$Addconversationphonenumber; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Create; + params = {} as + Params$Resource$Projects$Conversations$Addconversationphonenumber; options = {}; } @@ -9100,64 +9799,73 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases') + url: (rootUrl + '/v2beta1/{+name}:addConversationPhoneNumber') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>( parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>(parameters); + Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber>( + parameters); } } /** - * dialogflow.projects.knowledgeBases.delete - * @desc Deletes the specified knowledge base. - * @alias dialogflow.projects.knowledgeBases.delete + * dialogflow.projects.conversations.complete + * @desc Completes the specified conversation. Finished conversations are + * purged from the database after 30 days. + * @alias dialogflow.projects.conversations.complete * @memberOf! () * * @param {object} params Parameters for request - * @param {boolean=} params.force Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. - * @param {string} params.name Required. The name of the knowledge base to delete. Format: `projects//knowledgeBases/`. + * @param {string} params.name Required. Resource identifier of the conversation to close. Format: `projects//conversations/`. + * @param {().GoogleCloudDialogflowV2beta1CompleteConversationRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete( - params?: Params$Resource$Projects$Knowledgebases$Delete, - options?: MethodOptions): AxiosPromise; - delete( - params: Params$Resource$Projects$Knowledgebases$Delete, - options: MethodOptions|BodyResponseCallback, - callback: BodyResponseCallback): void; - delete( - params: Params$Resource$Projects$Knowledgebases$Delete, - callback: BodyResponseCallback): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: Params$Resource$Projects$Knowledgebases$Delete| - BodyResponseCallback, + complete( + params?: Params$Resource$Projects$Conversations$Complete, + options?: MethodOptions): + AxiosPromise; + complete( + params: Params$Resource$Projects$Conversations$Complete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + complete( + params: Params$Resource$Projects$Conversations$Complete, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + complete(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + complete( + paramsOrCallback?: Params$Resource$Projects$Conversations$Complete| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$Delete; + Params$Resource$Projects$Conversations$Complete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Delete; + params = {} as Params$Resource$Projects$Conversations$Complete; options = {}; } @@ -9170,8 +9878,9 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + url: (rootUrl + '/v2beta1/{+name}:complete') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' }, options), params, @@ -9180,52 +9889,131 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall context: this.getRoot() }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1Conversation>(parameters); } } /** - * dialogflow.projects.knowledgeBases.get - * @desc Retrieves the specified knowledge base. - * @alias dialogflow.projects.knowledgeBases.get + * dialogflow.projects.conversations.create + * @desc Creates a new conversation. Conversation are auto-completed after + * 24 hours. + * @alias dialogflow.projects.conversations.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the knowledge base to retrieve. Format `projects//knowledgeBases/`. + * @param {string} params.parent Required. Resource identifier of the project creating the conversation. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1Conversation} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get(params?: Params$Resource$Projects$Knowledgebases$Get, + create( + params?: Params$Resource$Projects$Conversations$Create, options?: MethodOptions): - AxiosPromise; - get(params: Params$Resource$Projects$Knowledgebases$Get, + AxiosPromise; + create( + params: Params$Resource$Projects$Conversations$Create, options: MethodOptions| - BodyResponseCallback, + BodyResponseCallback, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; - get(params: Params$Resource$Projects$Knowledgebases$Get, + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + create( + params: Params$Resource$Projects$Conversations$Create, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + create(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + create( + paramsOrCallback?: Params$Resource$Projects$Conversations$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Conversations$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/conversations') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1Conversation>(parameters); + } + } + + + /** + * dialogflow.projects.conversations.get + * @desc Retrieves the specific conversation. + * @alias dialogflow.projects.conversations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the conversation. Format: `projects//conversations/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Conversations$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Conversations$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + get(params: Params$Resource$Projects$Conversations$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; get(callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; - get(paramsOrCallback?: Params$Resource$Projects$Knowledgebases$Get| - BodyResponseCallback, + Schema$GoogleCloudDialogflowV2beta1Conversation>): void; + get(paramsOrCallback?: Params$Resource$Projects$Conversations$Get| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, + BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): - void|AxiosPromise { + Schema$GoogleCloudDialogflowV2beta1Conversation>): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$Get; + Params$Resource$Projects$Conversations$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Get; + params = {} as Params$Resource$Projects$Conversations$Get; options = {}; } @@ -9248,65 +10036,66 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>(parameters); + Schema$GoogleCloudDialogflowV2beta1Conversation>(parameters); } } /** - * dialogflow.projects.knowledgeBases.list - * @desc Returns the list of all knowledge bases of the specified agent. - * @alias dialogflow.projects.knowledgeBases.list + * dialogflow.projects.conversations.list + * @desc Returns the list of all conversations in the specified project. + * @alias dialogflow.projects.conversations.list * @memberOf! () * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 10 and at most 100. + * @param {string=} params.filter A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering:
  • The value must be a string, a number, or a boolean.
  • The comparison operator must be either `=`,`!=`, `>`, or `<`.
  • To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`).
  • For clarity, expressions can be enclosed in parentheses.
Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `FINISHED` conversations: `lifecycle_state = "FINISHED"` + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. - * @param {string} params.parent Required. The project to list of knowledge bases for. Format: `projects/`. + * @param {string} params.parent Required. The project from which to list all conversation. Format: `projects/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ list( - params?: Params$Resource$Projects$Knowledgebases$List, + params?: Params$Resource$Projects$Conversations$List, options?: MethodOptions): AxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>; + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>; list( - params: Params$Resource$Projects$Knowledgebases$List, + params: Params$Resource$Projects$Conversations$List, options: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>, + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>): void; list( - params: Params$Resource$Projects$Knowledgebases$List, + params: Params$Resource$Projects$Conversations$List, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>): void; list(callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): void; + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>): void; list( - paramsOrCallback?: Params$Resource$Projects$Knowledgebases$List| + paramsOrCallback?: Params$Resource$Projects$Conversations$List| BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>, + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>, optionsOrCallback?: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>, + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>): void|AxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse> { + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse> { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$List; + Params$Resource$Projects$Conversations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$List; + params = {} as Params$Resource$Projects$Conversations$List; options = {}; } @@ -9319,7 +10108,7 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases') + url: (rootUrl + '/v2beta1/{+parent}/conversations') .replace(/([^:]\/)\/+/g, '$1'), method: 'GET' }, @@ -9331,71 +10120,103 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall }; if (callback) { createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>( + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>( parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>( + Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse>( parameters); } } } - export interface Params$Resource$Projects$Knowledgebases$Create { + export interface Params$Resource$Projects$Conversations$Addconversationphonenumber { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The project to create a knowledge base for. Format: - * `projects/`. + * The name of this conversation. Format: `projects//conversations/`. */ - parent?: string; + name?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; + requestBody?: + Schema$GoogleCloudDialogflowV2beta1AddConversationPhoneNumberRequest; } - export interface Params$Resource$Projects$Knowledgebases$Delete { + export interface Params$Resource$Projects$Conversations$Complete { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Optional. Force deletes the knowledge base. When set to true, any - * documents in the knowledge base are also deleted. + * Required. Resource identifier of the conversation to close. Format: + * `projects//conversations/`. */ - force?: boolean; + name?: string; + /** - * Required. The name of the knowledge base to delete. Format: - * `projects//knowledgeBases/`. + * Request body metadata */ - name?: string; + requestBody?: + Schema$GoogleCloudDialogflowV2beta1CompleteConversationRequest; } - export interface Params$Resource$Projects$Knowledgebases$Get { + export interface Params$Resource$Projects$Conversations$Create { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the knowledge base to retrieve. Format - * `projects//knowledgeBases/`. + * Required. Resource identifier of the project creating the conversation. + * Format: `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Conversation; + } + export interface Params$Resource$Projects$Conversations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the conversation. Format: `projects//conversations/`. */ name?: string; } - export interface Params$Resource$Projects$Knowledgebases$List { + export interface Params$Resource$Projects$Conversations$List { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * A filter expression that filters conversations listed in the response. In + * general, the expression must specify the field name, a comparison + * operator, and the value to use for filtering:
  • The value must + * be a string, a number, or a boolean.
  • The comparison operator + * must be either `=`,`!=`, `>`, or `<`.
  • To filter on multiple + * expressions, separate the expressions with `AND` or `OR` (omitting + * both implies `AND`).
  • For clarity, expressions can be enclosed + * in parentheses.
Only `lifecycle_state` can be filtered on in + * this way. For example, the following expression only returns `FINISHED` + * conversations: `lifecycle_state = "FINISHED"` + */ + filter?: string; /** * Optional. The maximum number of items to return in a single page. By - * default 10 and at most 100. + * default 100 and at most 1000. */ pageSize?: number; /** @@ -9404,13 +10225,13 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall */ pageToken?: string; /** - * Required. The project to list of knowledge bases for. Format: + * Required. The project from which to list all conversation. Format: * `projects/`. */ parent?: string; } - export class Resource$Projects$Knowledgebases$Documents { + export class Resource$Projects$Conversations$Messages { root: Dialogflow; constructor(root: Dialogflow) { this.root = root; @@ -9423,50 +10244,51 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** - * dialogflow.projects.knowledgeBases.documents.create - * @desc Creates a new document. Operation - * @alias dialogflow.projects.knowledgeBases.documents.create + * dialogflow.projects.conversations.messages.list + * @desc Lists messages that belong to a given conversation. + * @alias dialogflow.projects.conversations.messages.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The knoweldge base to create a document for. Format: `projects//knowledgeBases/`. - * @param {().GoogleCloudDialogflowV2beta1Document} params.resource Request body data + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The name of the conversation to list messages for. Format: `projects//conversations/` * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create( - params?: Params$Resource$Projects$Knowledgebases$Documents$Create, + list( + params?: Params$Resource$Projects$Conversations$Messages$List, options?: MethodOptions): - AxiosPromise; - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, - callback: BodyResponseCallback): - void; - create(callback: BodyResponseCallback): - void; - create( - paramsOrCallback?: - Params$Resource$Projects$Knowledgebases$Documents$Create| - BodyResponseCallback, - optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + AxiosPromise; + list( + params: Params$Resource$Projects$Conversations$Messages$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>): void; + list( + params: Params$Resource$Projects$Conversations$Messages$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>): void; + list( + paramsOrCallback?: Params$Resource$Projects$Conversations$Messages$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>): void| + AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$Documents$Create; + Params$Resource$Projects$Conversations$Messages$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Create; + params = {} as Params$Resource$Projects$Conversations$Messages$List; options = {}; } @@ -9479,9 +10301,9 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents') + url: (rootUrl + '/v2beta1/{+parent}/messages') .replace(/([^:]\/)\/+/g, '$1'), - method: 'POST' + method: 'GET' }, options), params, @@ -9490,58 +10312,189 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>( parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse>( + parameters); } } + } + export interface Params$Resource$Projects$Conversations$Messages$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * dialogflow.projects.knowledgeBases.documents.delete - * @desc Deletes the specified document. Operation - * @alias dialogflow.projects.knowledgeBases.documents.delete + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The name of the conversation to list messages for. Format: + * `projects//conversations/` + */ + parent?: string; + } + + + export class Resource$Projects$Conversations$Participants { + root: Dialogflow; + suggestions: Resource$Projects$Conversations$Participants$Suggestions; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + this.suggestions = + new Resource$Projects$Conversations$Participants$Suggestions(root); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.conversations.participants.analyzeContent + * @desc Adds a text (chat, for example), or audio (phone recording, for + * example) message from a participan into the conversation. + * @alias dialogflow.projects.conversations.participants.analyzeContent * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The name of the document to delete. Format: `projects//knowledgeBases//documents/`. + * @param {string} params.participant Required. The name of the participant this text comes from. Format: `projects//conversations//participants/`. + * @param {().GoogleCloudDialogflowV2beta1AnalyzeContentRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - delete( - params?: Params$Resource$Projects$Knowledgebases$Documents$Delete, + analyzeContent( + params?: + Params$Resource$Projects$Conversations$Participants$Analyzecontent, options?: MethodOptions): - AxiosPromise; - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): + AxiosPromise; + analyzeContent( + params: + Params$Resource$Projects$Conversations$Participants$Analyzecontent, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>): void; + analyzeContent( + params: + Params$Resource$Projects$Conversations$Participants$Analyzecontent, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>): void; + analyzeContent(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>): void; - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, - callback: BodyResponseCallback): - void; - delete(callback: BodyResponseCallback): - void; - delete( + analyzeContent( paramsOrCallback?: - Params$Resource$Projects$Knowledgebases$Documents$Delete| - BodyResponseCallback, + Params$Resource$Projects$Conversations$Participants$Analyzecontent| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Conversations$Participants$Analyzecontent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Conversations$Participants$Analyzecontent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+participant}:analyzeContent') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['participant'], + pathParams: ['participant'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse>( + parameters); + } + } + + + /** + * dialogflow.projects.conversations.participants.create + * @desc Creates a new participant in a conversation. + * @alias dialogflow.projects.conversations.participants.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. Resource identifier of the conversation adding the participant. Format: `projects//conversations/`. + * @param {().GoogleCloudDialogflowV2beta1Participant} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Conversations$Participants$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Conversations$Participants$Create, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): void; + create( + params: Params$Resource$Projects$Conversations$Participants$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): void; + create(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): void; + create( + paramsOrCallback?: + Params$Resource$Projects$Conversations$Participants$Create| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$Documents$Delete; + Params$Resource$Projects$Conversations$Participants$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Delete; + params = {} as + Params$Resource$Projects$Conversations$Participants$Create; options = {}; } @@ -9554,67 +10507,66 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE' + url: (rootUrl + '/v2beta1/{+parent}/participants') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' }, options), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters); } } /** - * dialogflow.projects.knowledgeBases.documents.get - * @desc Retrieves the specified document. - * @alias dialogflow.projects.knowledgeBases.documents.get + * dialogflow.projects.conversations.participants.get + * @desc Retrieves a conversation participant. + * @alias dialogflow.projects.conversations.participants.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the document to retrieve. Format `projects//knowledgeBases//documents/`. + * @param {string} params.name Required. The name of the participant. Format: `projects//conversations//participants/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get(params?: Params$Resource$Projects$Knowledgebases$Documents$Get, + get(params?: Params$Resource$Projects$Conversations$Participants$Get, options?: MethodOptions): - AxiosPromise; - get(params: Params$Resource$Projects$Knowledgebases$Documents$Get, + AxiosPromise; + get(params: Params$Resource$Projects$Conversations$Participants$Get, options: MethodOptions| - BodyResponseCallback, - callback: - BodyResponseCallback): - void; - get(params: Params$Resource$Projects$Knowledgebases$Documents$Get, - callback: - BodyResponseCallback): - void; - get(callback: - BodyResponseCallback): - void; + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): void; + get(params: Params$Resource$Projects$Conversations$Participants$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): void; + get(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): void; get(paramsOrCallback?: - Params$Resource$Projects$Knowledgebases$Documents$Get| - BodyResponseCallback, + Params$Resource$Projects$Conversations$Participants$Get| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: - BodyResponseCallback): - void|AxiosPromise { + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Participant>): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$Documents$Get; + Params$Resource$Projects$Conversations$Participants$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Get; + params = {} as Params$Resource$Projects$Conversations$Participants$Get; options = {}; } @@ -9637,62 +10589,64 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback); } else { - return createAPIRequest( + return createAPIRequest( parameters); } } /** - * dialogflow.projects.knowledgeBases.documents.list - * @desc Returns the list of all documents of the knowledge base. - * @alias dialogflow.projects.knowledgeBases.documents.list + * dialogflow.projects.conversations.participants.list + * @desc Returns the list of all participants in the specified conversation. + * @alias dialogflow.projects.conversations.participants.list * @memberOf! () * * @param {object} params Parameters for request - * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 10 and at most 100. + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. - * @param {string} params.parent Required. The knowledge base to list all documents for. Format: `projects//knowledgeBases/`. + * @param {string} params.parent Required. The conversation to list all contexts from. Format: `projects//conversations/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ list( - params?: Params$Resource$Projects$Knowledgebases$Documents$List, + params?: Params$Resource$Projects$Conversations$Participants$List, options?: MethodOptions): - AxiosPromise; + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>; list( - params: Params$Resource$Projects$Knowledgebases$Documents$List, + params: Params$Resource$Projects$Conversations$Participants$List, options: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>, + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void; + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>): void; list( - params: Params$Resource$Projects$Knowledgebases$Documents$List, + params: Params$Resource$Projects$Conversations$Participants$List, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void; + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>): void; list(callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void; + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>): void; list( paramsOrCallback?: - Params$Resource$Projects$Knowledgebases$Documents$List| + Params$Resource$Projects$Conversations$Participants$List| BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>, + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>, optionsOrCallback?: MethodOptions|BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>, + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void| - AxiosPromise { + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse> { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Knowledgebases$Documents$List; + Params$Resource$Projects$Conversations$Participants$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$List; + params = {} as Params$Resource$Projects$Conversations$Participants$List; options = {}; } @@ -9705,7 +10659,7 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents') + url: (rootUrl + '/v2beta1/{+parent}/participants') .replace(/([^:]\/)\/+/g, '$1'), method: 'GET' }, @@ -9717,58 +10671,164 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall }; if (callback) { createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>( + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>( parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>( + Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse>( + parameters); + } + } + + + /** + * dialogflow.projects.conversations.participants.streamingAnalyzeContent + * @desc Adds a text (chat, for example), or audio (phone recording, for + * example) message from a participan into the conversation. Note: This + * method is only available through the gRPC API (not REST). The top-level + * message sent to the client by the server is + * `StreamingAnalyzeContentResponse`. Multiple response messages can be + * returned in order. The first one or more messages contain the + * `recognition_result` field. Each result represents a more complete + * transcript of what the user said. The next message contains the + * `reply_text` field and potentially the `reply_audio` field. The message + * can also contain the `automated_agent_reply` field. + * @alias + * dialogflow.projects.conversations.participants.streamingAnalyzeContent + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.participant Required. The name of the participant this text comes from. Format: `projects//conversations//participants/`. + * @param {().GoogleCloudDialogflowV2beta1StreamingAnalyzeContentRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + streamingAnalyzeContent( + params?: + Params$Resource$Projects$Conversations$Participants$Streaminganalyzecontent, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>; + streamingAnalyzeContent( + params: + Params$Resource$Projects$Conversations$Participants$Streaminganalyzecontent, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>): + void; + streamingAnalyzeContent( + params: + Params$Resource$Projects$Conversations$Participants$Streaminganalyzecontent, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>): + void; + streamingAnalyzeContent( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>): + void; + streamingAnalyzeContent( + paramsOrCallback?: + Params$Resource$Projects$Conversations$Participants$Streaminganalyzecontent| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Conversations$Participants$Streaminganalyzecontent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Conversations$Participants$Streaminganalyzecontent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+participant}:streamingAnalyzeContent') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['participant'], + pathParams: ['participant'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentResponse>( parameters); } } } - export interface Params$Resource$Projects$Knowledgebases$Documents$Create { + export interface Params$Resource$Projects$Conversations$Participants$Analyzecontent { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The knoweldge base to create a document for. Format: - * `projects//knowledgeBases/`. + * Required. The name of the participant this text comes from. Format: + * `projects//conversations//participants/`. */ - parent?: string; + participant?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; + requestBody?: Schema$GoogleCloudDialogflowV2beta1AnalyzeContentRequest; } - export interface Params$Resource$Projects$Knowledgebases$Documents$Delete { + export interface Params$Resource$Projects$Conversations$Participants$Create { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * The name of the document to delete. Format: `projects//knowledgeBases//documents/`. + * Required. Resource identifier of the conversation adding the participant. + * Format: `projects//conversations/`. */ - name?: string; + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Participant; } - export interface Params$Resource$Projects$Knowledgebases$Documents$Get { + export interface Params$Resource$Projects$Conversations$Participants$Get { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * Required. The name of the document to retrieve. Format `projects//knowledgeBases//documents/`. + * Required. The name of the participant. Format: `projects//conversations//participants/`. */ name?: string; } - export interface Params$Resource$Projects$Knowledgebases$Documents$List { + export interface Params$Resource$Projects$Conversations$Participants$List { /** * Auth client or API Key for the request */ @@ -9776,7 +10836,7 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** * Optional. The maximum number of items to return in a single page. By - * default 10 and at most 100. + * default 100 and at most 1000. */ pageSize?: number; /** @@ -9785,15 +10845,32 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall */ pageToken?: string; /** - * Required. The knowledge base to list all documents for. Format: - * `projects//knowledgeBases/`. + * Required. The conversation to list all contexts from. Format: + * `projects//conversations/`. */ parent?: string; } + export interface Params$Resource$Projects$Conversations$Participants$Streaminganalyzecontent { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Required. The name of the participant this text comes from. Format: + * `projects//conversations//participants/`. + */ + participant?: string; + /** + * Request body metadata + */ + requestBody?: + Schema$GoogleCloudDialogflowV2beta1StreamingAnalyzeContentRequest; + } - export class Resource$Projects$Operations { + export class Resource$Projects$Conversations$Participants$Suggestions { root: Dialogflow; constructor(root: Dialogflow) { this.root = root; @@ -9806,45 +10883,2773 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall /** - * dialogflow.projects.operations.get - * @desc Gets the latest state of a long-running operation. Clients can use - * this method to poll the operation result at intervals as recommended by - * the API service. - * @alias dialogflow.projects.operations.get + * dialogflow.projects.conversations.participants.suggestions.list + * @desc Retrieves suggestions for live agents. This method should be used + * by human agent client software to fetch suggestions in real-time, while + * the conversation with an end user is in progress. The functionality is + * implemented in terms of the [list + * pagination](/apis/design/design_patterns#list_pagination) design pattern. + * The client app should use the `next_page_token` field to fetch the next + * batch of suggestions. + * @alias dialogflow.projects.conversations.participants.suggestions.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The name of the operation resource. + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. The default value is 100; the maximum value is 1000. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The name of the conversation participant for whom to fetch suggestions. Format: `projects//conversations//participants/`. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - get(params?: Params$Resource$Projects$Operations$Get, + list( + params?: + Params$Resource$Projects$Conversations$Participants$Suggestions$List, options?: MethodOptions): - AxiosPromise; - get(params: Params$Resource$Projects$Operations$Get, - options: MethodOptions| - BodyResponseCallback, - callback: BodyResponseCallback): - void; - get(params: Params$Resource$Projects$Operations$Get, - callback: BodyResponseCallback): - void; + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>; + list( + params: + Params$Resource$Projects$Conversations$Participants$Suggestions$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>): void; + list( + params: + Params$Resource$Projects$Conversations$Participants$Suggestions$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>): void; + list( + paramsOrCallback?: + Params$Resource$Projects$Conversations$Participants$Suggestions$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Conversations$Participants$Suggestions$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Conversations$Participants$Suggestions$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/suggestions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse>( + parameters); + } + } + } + + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of items to return in a single page. The + * default value is 100; the maximum value is 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The name of the conversation participant for whom to fetch + * suggestions. Format: `projects//conversations//participants/`. + */ + parent?: string; + } + + + + export class Resource$Projects$Environments { + root: Dialogflow; + users: Resource$Projects$Environments$Users; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + this.users = new Resource$Projects$Environments$Users(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Projects$Environments$Users { + root: Dialogflow; + conversations: Resource$Projects$Environments$Users$Conversations; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + this.conversations = + new Resource$Projects$Environments$Users$Conversations(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Projects$Environments$Users$Conversations { + root: Dialogflow; + contexts: Resource$Projects$Environments$Users$Conversations$Contexts; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + this.contexts = + new Resource$Projects$Environments$Users$Conversations$Contexts(root); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.environments.users.conversations.deleteContexts + * @desc Deletes all active contexts in the specified session. + * @alias + * dialogflow.projects.environments.users.conversations.deleteContexts + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + deleteContexts( + params?: + Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts, + options?: MethodOptions): AxiosPromise; + deleteContexts( + params: + Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + deleteContexts( + params: + Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts, + callback: BodyResponseCallback): void; + deleteContexts(callback: BodyResponseCallback): + void; + deleteContexts( + paramsOrCallback?: + Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Environments$Users$Conversations$Deletecontexts { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the session to delete all contexts from. Format: + * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + + export class Resource$Projects$Environments$Users$Conversations$Contexts { + root: Dialogflow; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.environments.users.conversations.contexts.create + * @desc Creates a context. If the specified context already exists, + * overrides the context. + * @alias + * dialogflow.projects.environments.users.conversations.contexts.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {().GoogleCloudDialogflowV2beta1Context} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + create( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create, + callback: + BodyResponseCallback): + void; + create( + callback: + BodyResponseCallback): + void; + create( + paramsOrCallback?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * dialogflow.projects.environments.users.conversations.contexts.delete + * @desc Deletes the specified context. + * @alias + * dialogflow.projects.environments.users.conversations.contexts.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dialogflow.projects.environments.users.conversations.contexts.get + * @desc Retrieves the specified context. + * @alias dialogflow.projects.environments.users.conversations.contexts.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get, + options?: MethodOptions): + AxiosPromise; + get(params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + get(params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get, + callback: + BodyResponseCallback): + void; + get(callback: + BodyResponseCallback): + void; + get(paramsOrCallback?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * dialogflow.projects.environments.users.conversations.contexts.list + * @desc Returns the list of all contexts in the specified session. + * @alias dialogflow.projects.environments.users.conversations.contexts.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$List, + options?: MethodOptions): + AxiosPromise; + list( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; + list( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void; + list( + paramsOrCallback?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse>( + parameters); + } + } + + + /** + * dialogflow.projects.environments.users.conversations.contexts.patch + * @desc Updates the specified context. + * @alias + * dialogflow.projects.environments.users.conversations.contexts.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Context} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch, + options?: MethodOptions): + AxiosPromise; + patch( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + patch( + params: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch, + callback: + BodyResponseCallback): + void; + patch(callback: + BodyResponseCallback): + void; + patch( + paramsOrCallback?: + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Projects$Environments$Users$Conversations$Contexts$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + export interface Params$Resource$Projects$Environments$Users$Conversations$Contexts$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or + * `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is + * not specified, we assume default 'draft' environment. If `User ID` is not + * specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Environments$Users$Conversations$Contexts$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the context. Format: `projects//agent/sessions//contexts/` or + * `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is + * not specified, we assume default 'draft' environment. If `User ID` is not + * specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Environments$Users$Conversations$Contexts$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of items to return in a single page. By + * default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The session to list all contexts from. Format: + * `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' + * environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Environments$Users$Conversations$Contexts$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The unique identifier of the context. Format: + * `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The + * `Context ID` is always converted to lowercase. If `Environment ID` is not + * specified, we assume default 'draft' environment. If `User ID` is not + * specified, we assume default '-' user. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + + + + export class Resource$Projects$Humanagentassistants { + root: Dialogflow; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.humanAgentAssistants.compileSuggestions + * @desc Uses the specified human agent assistant to come up with + * suggestions (relevant articles and FAQs) on how to respond to a given + * conversation. + * @alias dialogflow.projects.humanAgentAssistants.compileSuggestions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the agent assistant. Format: `projects//humanAgentAssistants/`. + * @param {().GoogleCloudDialogflowV2beta1CompileSuggestionsRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + compileSuggestions( + params?: + Params$Resource$Projects$Humanagentassistants$Compilesuggestions, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>; + compileSuggestions( + params: + Params$Resource$Projects$Humanagentassistants$Compilesuggestions, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>): + void; + compileSuggestions( + params: + Params$Resource$Projects$Humanagentassistants$Compilesuggestions, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>): + void; + compileSuggestions( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>): + void; + compileSuggestions( + paramsOrCallback?: + Params$Resource$Projects$Humanagentassistants$Compilesuggestions| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Humanagentassistants$Compilesuggestions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Humanagentassistants$Compilesuggestions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}:compileSuggestions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsResponse>( + parameters); + } + } + + + /** + * dialogflow.projects.humanAgentAssistants.create + * @desc Creates a human agent assistant. + * @alias dialogflow.projects.humanAgentAssistants.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project to create a agent assistant for. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1HumanAgentAssistant} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Humanagentassistants$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Humanagentassistants$Create, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + create( + params: Params$Resource$Projects$Humanagentassistants$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + create(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + create( + paramsOrCallback?: Params$Resource$Projects$Humanagentassistants$Create| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Humanagentassistants$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Humanagentassistants$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/humanAgentAssistants') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>(parameters); + } + } + + + /** + * dialogflow.projects.humanAgentAssistants.delete + * @desc Deletes the specified human agent assistant. + * @alias dialogflow.projects.humanAgentAssistants.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the agent assistant. Format: `projects//humanAgentAssistants/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Humanagentassistants$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Humanagentassistants$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Humanagentassistants$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Humanagentassistants$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Humanagentassistants$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Humanagentassistants$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dialogflow.projects.humanAgentAssistants.get + * @desc Retrieves a human agent assistant. + * @alias dialogflow.projects.humanAgentAssistants.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name of the agent assistant. Format: `projects//humanAgentAssistants/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Humanagentassistants$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Humanagentassistants$Get, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + get(params: Params$Resource$Projects$Humanagentassistants$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + get(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + get(paramsOrCallback?: Params$Resource$Projects$Humanagentassistants$Get| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Humanagentassistants$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Humanagentassistants$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>(parameters); + } + } + + + /** + * dialogflow.projects.humanAgentAssistants.list + * @desc Returns the list of all human agent assistants. + * @alias dialogflow.projects.humanAgentAssistants.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. The default value is 100; the maximum value is 1000. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The project to list all agent assistants from. Format: `projects/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Humanagentassistants$List, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>; + list( + params: Params$Resource$Projects$Humanagentassistants$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>): + void; + list( + params: Params$Resource$Projects$Humanagentassistants$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>): + void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>): + void; + list( + paramsOrCallback?: Params$Resource$Projects$Humanagentassistants$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Humanagentassistants$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Humanagentassistants$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/humanAgentAssistants') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListHumanAgentAssistantsResponse>( + parameters); + } + } + + + /** + * dialogflow.projects.humanAgentAssistants.patch + * @desc Updates the specified human agent assistant. + * @alias dialogflow.projects.humanAgentAssistants.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required for all methods except `create` (`create` populates the name automatically). The unique identifier of human agent assistant. Format: `projects//humanAgentAssistants/`. + * @param {string=} params.updateMask Optional. The mask to specify which fields to update. + * @param {().GoogleCloudDialogflowV2beta1HumanAgentAssistant} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Humanagentassistants$Patch, + options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Projects$Humanagentassistants$Patch, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + patch( + params: Params$Resource$Projects$Humanagentassistants$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + patch(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Humanagentassistants$Patch| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Humanagentassistants$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Humanagentassistants$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant>(parameters); + } + } + } + + export interface Params$Resource$Projects$Humanagentassistants$Compilesuggestions { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the agent assistant. Format: + * `projects//humanAgentAssistants/`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1CompileSuggestionsRequest; + } + export interface Params$Resource$Projects$Humanagentassistants$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The project to create a agent assistant for. Format: + * `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant; + } + export interface Params$Resource$Projects$Humanagentassistants$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the agent assistant. Format: + * `projects//humanAgentAssistants/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Humanagentassistants$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The resource name of the agent assistant. Format: + * `projects//humanAgentAssistants/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Humanagentassistants$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of items to return in a single page. The + * default value is 100; the maximum value is 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The project to list all agent assistants from. Format: + * `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Humanagentassistants$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required for all methods except `create` (`create` populates the name + * automatically). The unique identifier of human agent assistant. Format: + * `projects//humanAgentAssistants/`. + */ + name?: string; + /** + * Optional. The mask to specify which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistant; + } + + + export class Resource$Projects$Knowledgebases { + root: Dialogflow; + documents: Resource$Projects$Knowledgebases$Documents; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + this.documents = new Resource$Projects$Knowledgebases$Documents(root); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.knowledgeBases.create + * @desc Creates a knowledge base. + * @alias dialogflow.projects.knowledgeBases.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project to create a knowledge base for. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1KnowledgeBase} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Knowledgebases$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Knowledgebases$Create, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; + create( + params: Params$Resource$Projects$Knowledgebases$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; + create(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; + create( + paramsOrCallback?: Params$Resource$Projects$Knowledgebases$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>(parameters); + } + } + + + /** + * dialogflow.projects.knowledgeBases.delete + * @desc Deletes the specified knowledge base. + * @alias dialogflow.projects.knowledgeBases.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {boolean=} params.force Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + * @param {string} params.name Required. The name of the knowledge base to delete. Format: `projects//knowledgeBases/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Knowledgebases$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Projects$Knowledgebases$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Projects$Knowledgebases$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Knowledgebases$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dialogflow.projects.knowledgeBases.get + * @desc Retrieves the specified knowledge base. + * @alias dialogflow.projects.knowledgeBases.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the knowledge base to retrieve. Format `projects//knowledgeBases/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Knowledgebases$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Knowledgebases$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; + get(params: Params$Resource$Projects$Knowledgebases$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; + get(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): void; + get(paramsOrCallback?: Params$Resource$Projects$Knowledgebases$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase>(parameters); + } + } + + + /** + * dialogflow.projects.knowledgeBases.list + * @desc Returns the list of all knowledge bases of the specified agent. + * @alias dialogflow.projects.knowledgeBases.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 10 and at most 100. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The project to list of knowledge bases for. Format: `projects/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Knowledgebases$List, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>; + list( + params: Params$Resource$Projects$Knowledgebases$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): + void; + list( + params: Params$Resource$Projects$Knowledgebases$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): + void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): void; + list( + paramsOrCallback?: Params$Resource$Projects$Knowledgebases$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse>( + parameters); + } + } + } + + export interface Params$Resource$Projects$Knowledgebases$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The project to create a knowledge base for. Format: + * `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; + } + export interface Params$Resource$Projects$Knowledgebases$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. Force deletes the knowledge base. When set to true, any + * documents in the knowledge base are also deleted. + */ + force?: boolean; + /** + * Required. The name of the knowledge base to delete. Format: + * `projects//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the knowledge base to retrieve. Format + * `projects//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of items to return in a single page. By + * default 10 and at most 100. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The project to list of knowledge bases for. Format: + * `projects/`. + */ + parent?: string; + } + + export class Resource$Projects$Knowledgebases$Documents { + root: Dialogflow; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.knowledgeBases.documents.create + * @desc Creates a new document. Operation + * @alias dialogflow.projects.knowledgeBases.documents.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The knoweldge base to create a document for. Format: `projects//knowledgeBases/`. + * @param {().GoogleCloudDialogflowV2beta1Document} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Knowledgebases$Documents$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, + callback: BodyResponseCallback): + void; + create(callback: BodyResponseCallback): + void; + create( + paramsOrCallback?: + Params$Resource$Projects$Knowledgebases$Documents$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$Documents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/documents') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dialogflow.projects.knowledgeBases.documents.delete + * @desc Deletes the specified document. Operation + * @alias dialogflow.projects.knowledgeBases.documents.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the document to delete. Format: `projects//knowledgeBases//documents/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Knowledgebases$Documents$Delete, + options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + callback: BodyResponseCallback): + void; + delete(callback: BodyResponseCallback): + void; + delete( + paramsOrCallback?: + Params$Resource$Projects$Knowledgebases$Documents$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$Documents$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dialogflow.projects.knowledgeBases.documents.get + * @desc Retrieves the specified document. + * @alias dialogflow.projects.knowledgeBases.documents.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the document to retrieve. Format `projects//knowledgeBases//documents/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Knowledgebases$Documents$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Knowledgebases$Documents$Get, + options: MethodOptions| + BodyResponseCallback, + callback: + BodyResponseCallback): + void; + get(params: Params$Resource$Projects$Knowledgebases$Documents$Get, + callback: + BodyResponseCallback): + void; + get(callback: + BodyResponseCallback): + void; + get(paramsOrCallback?: + Params$Resource$Projects$Knowledgebases$Documents$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: + BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$Documents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * dialogflow.projects.knowledgeBases.documents.list + * @desc Returns the list of all documents of the knowledge base. + * @alias dialogflow.projects.knowledgeBases.documents.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. By default 10 and at most 100. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The knowledge base to list all documents for. Format: `projects//knowledgeBases/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Knowledgebases$Documents$List, + options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void; + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void; + list( + paramsOrCallback?: + Params$Resource$Projects$Knowledgebases$Documents$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Knowledgebases$Documents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/documents') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse>( + parameters); + } + } + } + + export interface Params$Resource$Projects$Knowledgebases$Documents$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The knoweldge base to create a document for. Format: + * `projects//knowledgeBases/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the document to delete. Format: `projects//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the document to retrieve. Format `projects//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of items to return in a single page. By + * default 10 and at most 100. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The knowledge base to list all documents for. Format: + * `projects//knowledgeBases/`. + */ + parent?: string; + } + + + + export class Resource$Projects$Operations { + root: Dialogflow; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias dialogflow.projects.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Operations$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Operations$Get, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + get(params: Params$Resource$Projects$Operations$Get, + callback: BodyResponseCallback): + void; get(callback: BodyResponseCallback): void; - get(paramsOrCallback?: Params$Resource$Projects$Operations$Get| - BodyResponseCallback, + get(paramsOrCallback?: Params$Resource$Projects$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Projects$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Operations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + + + export class Resource$Projects$Phonenumberorders { + root: Dialogflow; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.phoneNumberOrders.cancel + * @desc Cancels an `PhoneNumberOrder`. Returns an error if the order is in + * state IN_PROGRESS or COMPLETED. + * @alias dialogflow.projects.phoneNumberOrders.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of the order to delete. Format: `projects//phoneNumberOrders/`. + * @param {().GoogleCloudDialogflowV2beta1CancelPhoneNumberOrderRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + cancel( + params?: Params$Resource$Projects$Phonenumberorders$Cancel, + options?: MethodOptions): AxiosPromise; + cancel( + params: Params$Resource$Projects$Phonenumberorders$Cancel, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + cancel( + params: Params$Resource$Projects$Phonenumberorders$Cancel, + callback: BodyResponseCallback): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: Params$Resource$Projects$Phonenumberorders$Cancel| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumberorders$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumberorders$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}:cancel') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * dialogflow.projects.phoneNumberOrders.create + * @desc Creates an order to request phone numbers be added to a project. + * The initial `LifecycleState` of a newly created order is PENDING. + * @alias dialogflow.projects.phoneNumberOrders.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. Resource identifier of the project requesting the orders. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1PhoneNumberOrder} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Projects$Phonenumberorders$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: Params$Resource$Projects$Phonenumberorders$Create, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + create( + params: Params$Resource$Projects$Phonenumberorders$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + create(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + create( + paramsOrCallback?: Params$Resource$Projects$Phonenumberorders$Create| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumberorders$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumberorders$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/phoneNumberOrders') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>(parameters); + } + } + + + /** + * dialogflow.projects.phoneNumberOrders.get + * @desc Returns a specific `PhoneNumberOrder`. + * @alias dialogflow.projects.phoneNumberOrders.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of the order to retrieve. Format: `projects//phoneNumberOrders/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Projects$Phonenumberorders$Get, + options?: MethodOptions): + AxiosPromise; + get(params: Params$Resource$Projects$Phonenumberorders$Get, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + get(params: Params$Resource$Projects$Phonenumberorders$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + get(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + get(paramsOrCallback?: Params$Resource$Projects$Phonenumberorders$Get| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumberorders$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumberorders$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>(parameters); + } + } + + + /** + * dialogflow.projects.phoneNumberOrders.list + * @desc Lists of all `PhoneNumberOrder` resources in the specified project. + * @alias dialogflow.projects.phoneNumberOrders.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. The default value is 100. The maximum value is 1000. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The project to list all orders from. Format: `projects/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Phonenumberorders$List, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>; + list( + params: Params$Resource$Projects$Phonenumberorders$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>): + void; + list( + params: Params$Resource$Projects$Phonenumberorders$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>): + void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>): + void; + list( + paramsOrCallback?: Params$Resource$Projects$Phonenumberorders$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumberorders$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumberorders$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/phoneNumberOrders') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumberOrdersResponse>( + parameters); + } + } + + + /** + * dialogflow.projects.phoneNumberOrders.patch + * @desc Updates the specified `PhoneNumberOrder` resource. Returns an error + * if the order is in state IN_PROGRESS or COMPLETED. + * @alias dialogflow.projects.phoneNumberOrders.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of this order. Format: `projects//phoneNumberOrders/`. + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1PhoneNumberOrder} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Phonenumberorders$Patch, + options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Projects$Phonenumberorders$Patch, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + patch( + params: Params$Resource$Projects$Phonenumberorders$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + patch(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Phonenumberorders$Patch| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumberorders$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumberorders$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder>(parameters); + } + } + } + + export interface Params$Resource$Projects$Phonenumberorders$Cancel { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The unique identifier of the order to delete. Format: + * `projects//phoneNumberOrders/`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: + Schema$GoogleCloudDialogflowV2beta1CancelPhoneNumberOrderRequest; + } + export interface Params$Resource$Projects$Phonenumberorders$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. Resource identifier of the project requesting the orders. + * Format: `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder; + } + export interface Params$Resource$Projects$Phonenumberorders$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The unique identifier of the order to retrieve. Format: + * `projects//phoneNumberOrders/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Phonenumberorders$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of items to return in a single page. The + * default value is 100. The maximum value is 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The project to list all orders from. Format: `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Phonenumberorders$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The unique identifier of this order. Format: `projects//phoneNumberOrders/`. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1PhoneNumberOrder; + } + + + export class Resource$Projects$Phonenumbers { + root: Dialogflow; + constructor(root: Dialogflow) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * dialogflow.projects.phoneNumbers.delete + * @desc Requests deletion of a `PhoneNumber`. The `PhoneNumber` is moved + * into the DELETE_REQUESTED state immediately, and is deleted approximately + * 30 days later. This method may only be called on a `PhoneNumber` in the + * ACTIVE state. + * @alias dialogflow.projects.phoneNumbers.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of the `PhoneNumber` to delete. Format: `projects//phoneNumbers/`. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Projects$Phonenumbers$Delete, + options?: MethodOptions): + AxiosPromise; + delete( + params: Params$Resource$Projects$Phonenumbers$Delete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + delete( + params: Params$Resource$Projects$Phonenumbers$Delete, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + delete(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + delete( + paramsOrCallback?: Params$Resource$Projects$Phonenumbers$Delete| + BodyResponseCallback, optionsOrCallback?: MethodOptions| - BodyResponseCallback, - callback?: BodyResponseCallback): - void|AxiosPromise { - let params = - (paramsOrCallback || {}) as Params$Resource$Projects$Operations$Get; + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumbers$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Operations$Get; + params = {} as Params$Resource$Projects$Phonenumbers$Delete; options = {}; } @@ -9858,32 +13663,335 @@ import(paramsOrCallback?: Params$Resource$Projects$Agent$Import|BodyResponseCall options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + + + /** + * dialogflow.projects.phoneNumbers.list + * @desc Returns the list of all phone numbers in the specified project. + * @alias dialogflow.projects.phoneNumbers.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of items to return in a single page. The default value is 100. The maximum value is 1000. + * @param {string=} params.pageToken Optional. The next_page_token value returned from a previous list request. + * @param {string} params.parent Required. The project to list all `PhoneNumber` resources from. Format: `projects/`. + * @param {boolean=} params.showDeleted Optional. Controls whether `PhoneNumber` resources in the DELETE_REQUESTED state should be returned. Defaults to false. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Projects$Phonenumbers$List, + options?: MethodOptions): + AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>; + list( + params: Params$Resource$Projects$Phonenumbers$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>): void; + list( + params: Params$Resource$Projects$Phonenumbers$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>): void; + list( + paramsOrCallback?: Params$Resource$Projects$Phonenumbers$List| + BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>): + void|AxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse> { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumbers$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumbers$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/phoneNumbers') + .replace(/([^:]\/)\/+/g, '$1'), method: 'GET' }, options), params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListPhoneNumbersResponse>( + parameters); + } + } + + + /** + * dialogflow.projects.phoneNumbers.patch + * @desc Updates the specified `PhoneNumber`. + * @alias dialogflow.projects.phoneNumbers.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of this phone number. Format: `projects//phoneNumbers/`. + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1PhoneNumber} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Projects$Phonenumbers$Patch, + options?: MethodOptions): + AxiosPromise; + patch( + params: Params$Resource$Projects$Phonenumbers$Patch, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + patch( + params: Params$Resource$Projects$Phonenumbers$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + patch(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + patch( + paramsOrCallback?: Params$Resource$Projects$Phonenumbers$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumbers$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumbers$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, requiredParams: ['name'], pathParams: ['name'], context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters); + } + } + + + /** + * dialogflow.projects.phoneNumbers.undelete + * @desc Cancels the deletion request for a `PhoneNumber`. This method may + * only be called on a `PhoneNumber` in the DELETE_REQUESTED state. + * @alias dialogflow.projects.phoneNumbers.undelete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of the `PhoneNumber` to delete. Format: `projects//phoneNumbers/`. + * @param {().GoogleCloudDialogflowV2beta1UndeletePhoneNumberRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + undelete( + params?: Params$Resource$Projects$Phonenumbers$Undelete, + options?: MethodOptions): + AxiosPromise; + undelete( + params: Params$Resource$Projects$Phonenumbers$Undelete, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + undelete( + params: Params$Resource$Projects$Phonenumbers$Undelete, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + undelete(callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): void; + undelete( + paramsOrCallback?: Params$Resource$Projects$Phonenumbers$Undelete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1PhoneNumber>): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Phonenumbers$Undelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Phonenumbers$Undelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}:undelete') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); } } } - export interface Params$Resource$Projects$Operations$Get { + export interface Params$Resource$Projects$Phonenumbers$Delete { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * The name of the operation resource. + * Required. The unique identifier of the `PhoneNumber` to delete. Format: + * `projects//phoneNumbers/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Phonenumbers$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Optional. The maximum number of items to return in a single page. The + * default value is 100. The maximum value is 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list + * request. + */ + pageToken?: string; + /** + * Required. The project to list all `PhoneNumber` resources from. Format: + * `projects/`. + */ + parent?: string; + /** + * Optional. Controls whether `PhoneNumber` resources in the + * DELETE_REQUESTED state should be returned. Defaults to false. + */ + showDeleted?: boolean; + } + export interface Params$Resource$Projects$Phonenumbers$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The unique identifier of this phone number. Format: + * `projects//phoneNumbers/`. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1PhoneNumber; + } + export interface Params$Resource$Projects$Phonenumbers$Undelete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The unique identifier of the `PhoneNumber` to delete. Format: + * `projects//phoneNumbers/`. */ name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1UndeletePhoneNumberRequest; } } diff --git a/src/apis/digitalassetlinks/README.md b/src/apis/digitalassetlinks/README.md index 91322b52737..e9413004be7 100644 --- a/src/apis/digitalassetlinks/README.md +++ b/src/apis/digitalassetlinks/README.md @@ -2,7 +2,7 @@ # @google/digitalassetlinks -> API for discovering relationships between online assets such as web sites or mobile apps. +> Discovers relationships between online assets such as websites or mobile apps. ## Installation diff --git a/src/apis/dlp/v2.ts b/src/apis/dlp/v2.ts index f02e2e35991..0dad54e873e 100644 --- a/src/apis/dlp/v2.ts +++ b/src/apis/dlp/v2.ts @@ -430,6 +430,55 @@ export namespace dlp_v2 { */ path?: string; } + /** + * Message representing a set of files in a Cloud Storage bucket. Regular + * expressions are used to allow fine-grained control over which files in the + * bucket to include. Included files are those that match at least one item + * in `include_regex` and do not match any items in `exclude_regex`. Note that + * a file that matches items from both lists will _not_ be included. For a + * match to occur, the entire file path (i.e., everything in the url after the + * bucket name) must match the regular expression. For example, given the + * input `{bucket_name: "mybucket", include_regex: + * ["directory1/.*"], exclude_regex: + * ["directory1/excluded.*"]}`: * `gs://mybucket/directory1/myfile` + * will be included * `gs://mybucket/directory1/directory2/myfile` will be + * included (`.*` matches across `/`) * + * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the + * full path doesn't match any items in `include_regex`) * + * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path + * matches an item in `exclude_regex`) If `include_regex` is left empty, it + * will match all files by default (this is equivalent to setting + * `include_regex: [".*"]`). Some other common use cases: * + * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` + * will include all files in `mybucket` except for .pdf files * `{bucket_name: + * "mybucket", include_regex: ["directory/[^/]+"]}` will + * include all files directly under `gs://mybucket/directory/`, without + * matching across `/` + */ + export interface Schema$GooglePrivacyDlpV2CloudStorageRegexFileSet { + /** + * The name of a Cloud Storage bucket. Required. + */ + bucketName?: string; + /** + * A list of regular expressions matching file paths to exclude. All files + * in the bucket that match at least one of these regular expressions will + * be excluded from the scan. Regular expressions use RE2 + * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + * under the google/re2 repository on GitHub. + */ + excludeRegex?: string[]; + /** + * A list of regular expressions matching file paths to include. All files + * in the bucket that match at least one of these regular expressions will + * be included in the set of files, except for those that also match an item + * in `exclude_regex`. Leaving this field empty will match all files by + * default (this is equivalent to including `.*` in the list). Regular + * expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); + * a guide can be found under the google/re2 repository on GitHub. + */ + includeRegex?: string[]; + } /** * Represents a color in the RGB color space. */ @@ -504,9 +553,13 @@ export namespace dlp_v2 { export interface Schema$GooglePrivacyDlpV2ContentLocation { /** * Name of the container where the finding is located. The top level name is - * the source file name or table name. Nested names could be absent if the - * embedded object has no string identifier (for an example an image - * contained within a document). + * the source file name or table name. Names of some common storage + * containers are formatted as follows: * BigQuery tables: + * `<project_id>:<dataset_id>.<table_id>` * Cloud Storage + * files: `gs://<bucket>/<path>` * Datastore namespace: + * <namespace> Nested names could be absent if the embedded object + * has no string identifier (for an example an image contained within a + * document). */ containerName?: string; /** @@ -719,6 +772,10 @@ export namespace dlp_v2 { * A list of phrases to detect as a CustomInfoType. */ dictionary?: Schema$GooglePrivacyDlpV2Dictionary; + /** + * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding + * to be returned. It still can be used for rules matching. + */ exclusionType?: string; /** * CustomInfoType can either be a new infoType, or an extension of built-in @@ -1220,10 +1277,15 @@ export namespace dlp_v2 { * Set of files to scan. */ export interface Schema$GooglePrivacyDlpV2FileSet { + /** + * The regex-filtered set of files to scan. Exactly one of `url` or + * `regex_file_set` must be set. + */ + regexFileSet?: Schema$GooglePrivacyDlpV2CloudStorageRegexFileSet; /** * The Cloud Storage url of the file(s) to scan, in the format * `gs://<bucket>/<path>`. Trailing wildcard in the path is - * allowed. + * allowed. Exactly one of `url` or `regex_file_set` must be set. */ url?: string; } @@ -4508,6 +4570,7 @@ export namespace dlp_v2 { * @memberOf! () * * @param {object} params Parameters for request + * @param {string=} params.orderBy Optional comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name. * @param {integer=} params.pageSize Optional size of the page, can be limited by server. If zero server returns a page of max size 100. * @param {string=} params.pageToken Optional page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`. * @param {string} params.parent The parent resource name, for example projects/my-project-id or organizations/my-org-id. @@ -4709,6 +4772,17 @@ export namespace dlp_v2 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Optional comma separated list of fields to order by, followed by `asc` or + * `desc` postfix. This list is case-insensitive, default sorting order is + * ascending, redundant space characters are insignificant. Example: `name + * asc, display_name, create_time desc` Supported fields are: - + * `create_time`: corresponds to time the most recent version of the + * resource was created. - `state`: corresponds to the state of the + * resource. - `name`: corresponds to resource name. - `display_name`: + * corresponds to info type's display name. + */ + orderBy?: string; /** * Optional size of the page, can be limited by server. If zero server * returns a page of max size 100. @@ -5876,6 +5950,7 @@ export namespace dlp_v2 { * * @param {object} params Parameters for request * @param {string=} params.filter Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of ` `. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The resource name of the trigger that created job. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) The length of this field should be no more than 500 characters. + * @param {string=} params.orderBy Optional comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to time the job was created. - `end_time`: corresponds to time the job ended. - `name`: corresponds to job's name. - `state`: corresponds to `state` * @param {integer=} params.pageSize The standard list page size. * @param {string=} params.pageToken The standard list page token. * @param {string} params.parent The parent resource name, for example projects/my-project-id. @@ -6028,6 +6103,16 @@ export namespace dlp_v2 { * characters. */ filter?: string; + /** + * Optional comma separated list of fields to order by, followed by `asc` or + * `desc` postfix. This list is case-insensitive, default sorting order is + * ascending, redundant space characters are insignificant. Example: `name + * asc, end_time asc, create_time desc` Supported fields are: - + * `create_time`: corresponds to time the job was created. - `end_time`: + * corresponds to time the job ended. - `name`: corresponds to job's name. - + * `state`: corresponds to `state` + */ + orderBy?: string; /** * The standard list page size. */ @@ -7368,6 +7453,7 @@ export namespace dlp_v2 { * @memberOf! () * * @param {object} params Parameters for request + * @param {string=} params.orderBy Optional comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name. * @param {integer=} params.pageSize Optional size of the page, can be limited by server. If zero server returns a page of max size 100. * @param {string=} params.pageToken Optional page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`. * @param {string} params.parent The parent resource name, for example projects/my-project-id or organizations/my-org-id. @@ -7569,6 +7655,17 @@ export namespace dlp_v2 { */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + /** + * Optional comma separated list of fields to order by, followed by `asc` or + * `desc` postfix. This list is case-insensitive, default sorting order is + * ascending, redundant space characters are insignificant. Example: `name + * asc, display_name, create_time desc` Supported fields are: - + * `create_time`: corresponds to time the most recent version of the + * resource was created. - `state`: corresponds to the state of the + * resource. - `name`: corresponds to resource name. - `display_name`: + * corresponds to info type's display name. + */ + orderBy?: string; /** * Optional size of the page, can be limited by server. If zero server * returns a page of max size 100. diff --git a/src/apis/file/v1beta1.ts b/src/apis/file/v1beta1.ts index b2b39bb86c4..7c7e877b974 100644 --- a/src/apis/file/v1beta1.ts +++ b/src/apis/file/v1beta1.ts @@ -69,20 +69,6 @@ export namespace file_v1beta1 { * The request message for Operations.CancelOperation. */ export interface Schema$CancelOperationRequest {} - /** - * The sets of network addresses and DNS names for hosts to which a given - * export or share should be allowed or denied. - */ - export interface Schema$ClientList { - /** - * DNS names of hosts, with optional wildcards. - */ - hostNames?: string[]; - /** - * IPv4 addresses in the format {octet 1}.{octet 2}.{octet 3}.{octet 4}. - */ - ipAddresses?: string[]; - } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request @@ -91,45 +77,6 @@ export namespace file_v1beta1 { * representation for `Empty` is empty JSON object `{}`. */ export interface Schema$Empty {} - /** - * File share export specification. - */ - export interface Schema$Export { - /** - * The clients which may connect. - */ - allowedClients?: Schema$ClientList; - /** - * Writes may be completed when not yet on stable storage. - */ - async?: boolean; - /** - * The clients which may not connect. - */ - deniedClients?: Schema$ClientList; - /** - * Networks on which the export should appear. If none are specified, the - * default is all networks to which the instance is connected to. - */ - networks?: Schema$NetworkConfig[]; - /** - * Export rule for NFS - */ - nfsExport?: Schema$NfsExport; - /** - * Path to export (either "" or of the form - * /file_share_name[/subdir]). - */ - path?: string; - /** - * Whether the file share should be exported as read-only. - */ - readOnly?: boolean; - /** - * Export rule for SMB - */ - smbExport?: Schema$SmbExport; - } /** * File share configuration for the instance. */ @@ -139,29 +86,10 @@ export namespace file_v1beta1 { * 1024^3 bytes. */ capacityGb?: string; - /** - * Delete requested. The file share will be deleted. - */ - deleted?: boolean; - /** - * Service enabled. When enabled, the instance exposes the exports to the - * user for mounting. - */ - enabled?: boolean; - /** - * Exports. If protocols and exports are both zero-length, a default - * protocol of NFSV3 and a default export of "*" are provided, and - * enabled is set to true. - */ - exports?: Schema$Export[]; /** * The name of the file share (must be 16 characters or less). */ name?: string; - /** - * Protocols supported. - */ - protocols?: string[]; } /** * A Cloud Filestore instance. @@ -189,21 +117,6 @@ export namespace file_v1beta1 { * Resource labels to represent user provided metadata. */ labels?: any; - /** - * The logging service the instance should use to write logs. Currently - * available options: * `logging.googleapis.com` - the Google Cloud Logging - * service. * `none` - no logs will be exported from the instance. * if left - * as an empty string,`logging.googleapis.com` will be used. - */ - loggingService?: string; - /** - * The monitoring service the instance should use to write metrics. - * Currently available options: * `monitoring.googleapis.com` - the Google - * Cloud Monitoring service. * `none` - no metrics will be exported from the - * instance. * if left as an empty string, `monitoring.googleapis.com` will - * be used. - */ - monitoringService?: string; /** * Output only. The resource name of the instance, in the format * projects/{project_id}/locations/{location_id}/instances/{instance_id}. @@ -336,43 +249,6 @@ export namespace file_v1beta1 { * other Cloud Filestore instances in the selected VPC network. */ reservedIpRange?: string; - /** - * Output only. The name of the Google Compute Engine - * [subnetwork](/compute/docs/subnetworks) to which the instance is - * connected. - */ - subnetwork?: string; - } - /** - * NfsExport specifies attributes of a given NFS export rule. - */ - export interface Schema$NfsExport { - /** - * GID for anonymous or squashed GIDs. - */ - anonymousGid?: string; - /** - * UID for anonymous or squashed UIDs. - */ - anonymousUid?: string; - /** - * Network transport protocols to be enabled. The default is TCP. - */ - protocols?: string[]; - /** - * The mode of mapping of UIDs and GIDs (if any). - */ - squash?: string; - /** - * If unauthenticated_locks_allowed is true, locking requests do not require - * authentication. - */ - unauthenticatedLocksAllowed?: boolean; - /** - * If user_ports_allowed is true, client ports greater than or equal to 1024 - * are allowed. - */ - userPortsAllowed?: boolean; } /** * This resource represents a long-running operation that is the result of a @@ -450,20 +326,6 @@ export namespace file_v1beta1 { */ verb?: string; } - /** - * SmbExport defines attributes of a given SMB sharing rule. - */ - export interface Schema$SmbExport { - /** - * If true, allow clients to see this share when browsing the instance for - * shares. - */ - browsable?: boolean; - /** - * The published name of the share (if different from name). - */ - fileShare?: string; - } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is diff --git a/src/apis/firebasedynamiclinks/v1.ts b/src/apis/firebasedynamiclinks/v1.ts index 8b820a7e4f6..1401cb5a7fb 100644 --- a/src/apis/firebasedynamiclinks/v1.ts +++ b/src/apis/firebasedynamiclinks/v1.ts @@ -127,6 +127,11 @@ export namespace firebasedynamiclinks_v1 { * tracked. */ name?: string; + /** + * Google SDK version. Version takes the form + * "$major.$minor.$patch" + */ + sdkVersion?: string; /** * Short Dynamic Link suffix. Optional. */ @@ -166,6 +171,11 @@ export namespace firebasedynamiclinks_v1 { * more](https://firebase.google.com/docs/reference/dynamic-links/link-shortener). */ longDynamicLink?: string; + /** + * Google SDK version. Version takes the form + * "$major.$minor.$patch" + */ + sdkVersion?: string; /** * Short Dynamic Link suffix. Optional. */ @@ -361,7 +371,8 @@ export namespace firebasedynamiclinks_v1 { */ retrievalMethod?: string; /** - * Google SDK version. + * Google SDK version. Version takes the form + * "$major.$minor.$patch" */ sdkVersion?: string; /** @@ -473,6 +484,11 @@ export namespace firebasedynamiclinks_v1 { * Invite FDL. e.g. <app_code>.page.link/i/<invite_id_or_alias> */ requestedLink?: string; + /** + * Google SDK version. Version takes the form + * "$major.$minor.$patch" + */ + sdkVersion?: string; } /** * Response for iSDK to get reopen attribution for app universal link open @@ -907,6 +923,7 @@ export namespace firebasedynamiclinks_v1 { * @param {object} params Parameters for request * @param {string=} params.durationDays The span of time requested in days. * @param {string} params.dynamicLink Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz + * @param {string=} params.sdkVersion Google SDK version. Version takes the form "$major.$minor.$patch" * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -1136,6 +1153,10 @@ export namespace firebasedynamiclinks_v1 { * Dynamic Link URL. e.g. https://abcd.app.goo.gl/wxyz */ dynamicLink?: string; + /** + * Google SDK version. Version takes the form "$major.$minor.$patch" + */ + sdkVersion?: string; } export interface Params$Resource$V1$Installattribution { /** diff --git a/src/apis/firebasehosting/README.md b/src/apis/firebasehosting/README.md new file mode 100644 index 00000000000..0b40dac2582 --- /dev/null +++ b/src/apis/firebasehosting/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/firebasehosting + +> + +## Installation + +```sh +$ npm install @google/firebasehosting +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/firebasehosting/index.ts b/src/apis/firebasehosting/index.ts new file mode 100644 index 00000000000..8d92038451a --- /dev/null +++ b/src/apis/firebasehosting/index.ts @@ -0,0 +1,31 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {firebasehosting_v1beta1} from './v1beta1'; + +export const VERSIONS = { + 'v1beta1': firebasehosting_v1beta1.Firebasehosting, +}; + +export function firebasehosting(version: 'v1beta1'): + firebasehosting_v1beta1.Firebasehosting; +export function firebasehosting(options: firebasehosting_v1beta1.Options): + firebasehosting_v1beta1.Firebasehosting; +export function firebasehosting( + this: GoogleConfigurable, + versionOrOptions: 'v1beta1'|firebasehosting_v1beta1.Options) { + return getAPI('firebasehosting', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/firebasehosting/package.json b/src/apis/firebasehosting/package.json new file mode 100644 index 00000000000..f9364723688 --- /dev/null +++ b/src/apis/firebasehosting/package.json @@ -0,0 +1,24 @@ +{ + "name": "@google/firebasehosting", + "version": "0.1.0", + "description": "firebasehosting", + "main": "index.js", + "types": "index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "dependencies": { + "googleapis-common": "^0.2.0" + } +} diff --git a/src/apis/firebasehosting/v1beta1.ts b/src/apis/firebasehosting/v1beta1.ts new file mode 100644 index 00000000000..8d146179619 --- /dev/null +++ b/src/apis/firebasehosting/v1beta1.ts @@ -0,0 +1,1623 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace firebasehosting_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + /** + * Firebase Hosting API + * + * + * + * @example + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * @namespace firebasehosting + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for Firebasehosting + */ + export class Firebasehosting { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + sites: Resource$Sites; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.sites = new Resource$Sites(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Contains metadata about the user who performed an action, such as creating + * a release or finalizing a version. + */ + export interface Schema$ActingUser { + /** + * The email address of the user when the user performed the action. + */ + email?: string; + /** + * A profile image URL for the user. May not be present if the user has + * changed their email address or deleted their account. + */ + imageUrl?: string; + } + /** + * Represents a DNS certificate challenge. + */ + export interface Schema$CertDnsChallenge { + /** + * The domain name upon which the DNS challenge must be satisfied. + */ + domainName?: string; + /** + * The value that must be present as a TXT record on the domain name to + * satisfy the challenge. + */ + token?: string; + } + /** + * Represents an HTTP certificate challenge. + */ + export interface Schema$CertHttpChallenge { + /** + * The URL path on which to serve the specified token to satisfy the + * certificate challenge. + */ + path?: string; + /** + * The token to serve at the specified URL path to satisfy the certificate + * challenge. + */ + token?: string; + } + /** + * The intended behavior and status information of a domain. + */ + export interface Schema$Domain { + /** + * Required. The domain name of the association. + */ + domainName?: string; + /** + * If set, the domain should redirect with the provided parameters. + */ + domainRedirect?: Schema$DomainRedirect; + /** + * Output only. Information about the provisioning of certificates and the + * health of the DNS resolution for the domain. + */ + provisioning?: Schema$DomainProvisioning; + /** + * Required. The site name of the association. + */ + site?: string; + /** + * Output only. Additional status of the domain association. + */ + status?: string; + /** + * Output only. The time at which the domain was last updated. + */ + updateTime?: string; + } + /** + * The current certificate provisioning status information for a domain. + */ + export interface Schema$DomainProvisioning { + /** + * The TXT records (for the certificate challenge) that were found at the + * last DNS fetch. + */ + certChallengeDiscoveredTxt?: string[]; + /** + * The DNS challenge for generating a certificate. + */ + certChallengeDns?: Schema$CertDnsChallenge; + /** + * The HTTP challenge for generating a certificate. + */ + certChallengeHttp?: Schema$CertHttpChallenge; + /** + * The certificate provisioning status; updated when Firebase Hosting + * provisions an SSL certificate for the domain. + */ + certStatus?: string; + /** + * The IPs found at the last DNS fetch. + */ + discoveredIps?: string[]; + /** + * The time at which the last DNS fetch occurred. + */ + dnsFetchTime?: string; + /** + * The DNS record match status as of the last DNS fetch. + */ + dnsStatus?: string; + /** + * The list of IPs to which the domain is expected to resolve. + */ + expectedIps?: string[]; + } + /** + * Defines the behavior of a domain-level redirect. Domain redirects preserve + * the path of the redirect but replace the requested domain with the one + * specified in the redirect configuration. + */ + export interface Schema$DomainRedirect { + /** + * Required. The domain name to redirect to. + */ + domainName?: string; + /** + * Required. The redirect status code. + */ + type?: string; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: service Foo { rpc + * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON + * representation for `Empty` is empty JSON object `{}`. + */ + export interface Schema$Empty {} + /** + * A `Header` defines custom headers to add to a response should the request + * URL path match the pattern. + */ + export interface Schema$Header { + /** + * Required. The user-supplied [glob + * pattern](/docs/hosting/full-config#section-glob) to match against the + * request URL path. + */ + glob?: string; + /** + * Required. The additional headers to add to the response. + */ + headers?: any; + } + export interface Schema$ListDomainsResponse { + /** + * The list of domains, if any exist. + */ + domains?: Schema$Domain[]; + /** + * The pagination token, if more results exist. + */ + nextPageToken?: string; + } + export interface Schema$ListReleasesResponse { + /** + * If there are additional releases remaining beyond the ones in this + * response, then supply this token in the next + * [`list`](../sites.versions.files/list) call to continue with the next set + * of releases. + */ + nextPageToken?: string; + /** + * The list of hashes of files that still need to be uploaded, if any exist. + */ + releases?: Schema$Release[]; + } + export interface Schema$ListVersionFilesResponse { + /** + * The list path/hashes in the specified version. + */ + files?: Schema$VersionFile[]; + /** + * The pagination token, if more results exist. + */ + nextPageToken?: string; + } + export interface Schema$PopulateVersionFilesRequest { + /** + * A set of file paths to the hashes corresponding to assets that should be + * added to the version. Note that a file path to an empty hash will remove + * the path from the version. Calculate a hash by Gzipping the file then + * taking the SHA256 hash of the newly compressed file. + */ + files?: any; + } + export interface Schema$PopulateVersionFilesResponse { + /** + * The content hashes of the specified files that need to be uploaded to the + * specified endpoint. + */ + uploadRequiredHashes?: string[]; + /** + * The URL to which the files should be uploaded, in the format: + * <br>"https://upload-firebasehosting.googleapis.com/upload/sites/<var>site-name</var>/versions/<var>versionID</var>/files". + * <br>Perform a multipart `POST` of the Gzipped file contents to the + * URL using a forward slash and the hash of the file appended to the end. + */ + uploadUrl?: string; + } + /** + * A `Redirect` represents the configuration for returning an HTTP redirect + * response given a matching request URL path. + */ + export interface Schema$Redirect { + /** + * Required. The user-supplied [glob + * pattern](/docs/hosting/full-config#section-glob) to match against the + * request URL path. + */ + glob?: string; + /** + * Required. The value to put in the HTTP location header of the response. + * <br>The location can contain capture group values from the pattern + * using a `":"` prefix to identify the segment and an optional + * `"*"` to capture the rest of the URL. For example: + * <code>"glob": "/:capture*", + * <br>"statusCode": 301, <br>"location": + * "https://example.com/foo/:capture"</code> + */ + location?: string; + /** + * Required. The status HTTP code to return in the response. It must be a + * valid 3xx status code. + */ + statusCode?: number; + } + /** + * A `Release` is a particular [collection of configurations and + * files](sites.versions) that is set to be public at a particular time. + */ + export interface Schema$Release { + /** + * The deploy description when the release was created. The value can be up + * to 512&nbsp;characters. + */ + message?: string; + /** + * Output only. The unique identifier for the release, in the format: + * <code>sites/<var>site-name</var>/releases/<var>releaseID</var></code> + * This name is provided in the response body when you call the + * [`CreateRelease`](sites.releases/create) endpoint. + */ + name?: string; + /** + * Output only. The time at which the version is set to be public. + */ + releaseTime?: string; + /** + * Output only. Identifies the user who created the release. + */ + releaseUser?: Schema$ActingUser; + /** + * Explains the reason for the release. <br>Specify a value for this + * field only when creating a `SITE_DISABLE` type release. + */ + type?: string; + /** + * Output only. The configuration and content that was released. + */ + version?: Schema$Version; + } + /** + * A `Rewrite` represents an internal content rewrite on the version. If the + * pattern matches, the request will be handled as if it were to the + * destination path specified in the configuration. + */ + export interface Schema$Rewrite { + /** + * The request will be forwarded to Firebase Dynamic Links. + */ + dynamicLinks?: boolean; + /** + * The function to proxy requests to. Must match the exported function name + * exactly. + */ + function?: string; + /** + * Required. The user-supplied [glob + * pattern](/docs/hosting/full-config#section-glob) to match against the + * request URL path. + */ + glob?: string; + /** + * The URL path to rewrite the request to. + */ + path?: string; + } + /** + * The configuration for how incoming requests to a site should be routed and + * processed before serving content. The patterns are matched and applied + * according to a specific [priority + * order](/docs/hosting/url-redirects-rewrites#section-priorities). + */ + export interface Schema$ServingConfig { + /** + * How to handle well known App Association files. + */ + appAssociation?: string; + /** + * Defines whether to drop the file extension from uploaded files. + */ + cleanUrls?: boolean; + /** + * A list of custom response headers that are added to the content if the + * request URL path matches the glob. + */ + headers?: Schema$Header[]; + /** + * A list of globs that will cause the response to redirect to another + * location. + */ + redirects?: Schema$Redirect[]; + /** + * A list of rewrites that will act as if the service were given the + * destination URL. + */ + rewrites?: Schema$Rewrite[]; + /** + * Defines how to handle a trailing slash in the URL path. + */ + trailingSlashBehavior?: string; + } + /** + * A `Version` is the collection of configuration and [static + * files](sites.versions.files) that determine how a site is displayed. + */ + export interface Schema$Version { + /** + * The configuration for the behavior of the site. This configuration exists + * in the [`firebase.json`](/docs/cli/#the_firebasejson_file) file. + */ + config?: Schema$ServingConfig; + /** + * Output only. The time at which the version was created. + */ + createTime?: string; + /** + * Output only. Identifies the user who created the version. + */ + createUser?: Schema$ActingUser; + /** + * Output only. The time at which the version was `DELETED`. + */ + deleteTime?: string; + /** + * Output only. Identifies the user who `DELETED` the version. + */ + deleteUser?: Schema$ActingUser; + /** + * Output only. The total number of files associated with the version. + * <br>This value is calculated after a version is `FINALIZED`. + */ + fileCount?: string; + /** + * Output only. The time at which the version was `FINALIZED`. + */ + finalizeTime?: string; + /** + * Output only. Identifies the user who `FINALIZED` the version. + */ + finalizeUser?: Schema$ActingUser; + /** + * The labels used for extra metadata and/or filtering. + */ + labels?: any; + /** + * The unique identifier for a version, in the format: + * <code>sites/<var>site-name</var>/versions/<var>versionID</var></code> + * This name is provided in the response body when you call the + * [`CreateVersion`](../sites.versions/create) endpoint. + */ + name?: string; + /** + * The deploy status of a version. <br> <br>For a successful + * deploy, call the [`CreateVersion`](sites.versions/create) endpoint to + * make a new version (`CREATED` status), [upload all desired + * files](sites.versions/populateFiles) to the version, then + * [update](sites.versions/patch) the version to the `FINALIZED` status. + * <br> <br>Note that if you leave the version in the `CREATED` + * state for more than 12&nbsp;hours, the system will automatically mark + * the version as `ABANDONED`. <br> <br>You can also change the + * status of a version to `DELETED` by calling the + * [`DeleteVersion`](sites.versions/delete) endpoint. + */ + status?: string; + /** + * Output only. The total stored bytesize of the version. <br>This + * value is calculated after a version is `FINALIZED`. + */ + versionBytes?: string; + } + /** + * A static content file that is part of a version. + */ + export interface Schema$VersionFile { + /** + * The SHA256 content hash of the file. + */ + hash?: string; + /** + * The URI at which the file's content should display. + */ + path?: string; + /** + * Output only. The current status of a particular file in the specified + * version. <br>The value will be either `pending upload` or + * `uploaded`. + */ + status?: string; + } + + + export class Resource$Sites { + root: Firebasehosting; + domains: Resource$Sites$Domains; + releases: Resource$Sites$Releases; + versions: Resource$Sites$Versions; + constructor(root: Firebasehosting) { + this.root = root; + this.getRoot.bind(this); + this.domains = new Resource$Sites$Domains(root); + this.releases = new Resource$Sites$Releases(root); + this.versions = new Resource$Sites$Versions(root); + } + + getRoot() { + return this.root; + } + } + + + export class Resource$Sites$Domains { + root: Firebasehosting; + constructor(root: Firebasehosting) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * firebasehosting.sites.domains.create + * @desc Creates a domain mapping on the specified site. + * @alias firebasehosting.sites.domains.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The parent to create the domain association for, in the format: sites/site-name + * @param {().Domain} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Sites$Domains$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Sites$Domains$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Sites$Domains$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Sites$Domains$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Domains$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Domains$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/domains') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.domains.delete + * @desc Deletes the existing domain mapping on the specified site. + * @alias firebasehosting.sites.domains.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the domain association to delete. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Sites$Domains$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Sites$Domains$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Sites$Domains$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Sites$Domains$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Domains$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Domains$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.domains.get + * @desc Gets a domain mapping on the specified site. + * @alias firebasehosting.sites.domains.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the domain configuration to get. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Sites$Domains$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Sites$Domains$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Sites$Domains$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Sites$Domains$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Domains$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Domains$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.domains.list + * @desc Lists the domains for the specified site. + * @alias firebasehosting.sites.domains.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize The page size to return. Defaults to 50. + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The parent for which to list domains, in the format: sites/site-name + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Sites$Domains$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Sites$Domains$List, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Sites$Domains$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Sites$Domains$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Domains$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Domains$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/domains') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.domains.update + * @desc Updates the specified domain mapping, creating the mapping as if it + * does not exist. + * @alias firebasehosting.sites.domains.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the domain association to update or create, if an association doesn't already exist. + * @param {().Domain} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + update( + params?: Params$Resource$Sites$Domains$Update, + options?: MethodOptions): AxiosPromise; + update( + params: Params$Resource$Sites$Domains$Update, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + update( + params: Params$Resource$Sites$Domains$Update, + callback: BodyResponseCallback): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: Params$Resource$Sites$Domains$Update| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Domains$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Domains$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sites$Domains$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The parent to create the domain association for, in the format: + * sites/site-name + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Sites$Domains$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the domain association to delete. + */ + name?: string; + } + export interface Params$Resource$Sites$Domains$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the domain configuration to get. + */ + name?: string; + } + export interface Params$Resource$Sites$Domains$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The page size to return. Defaults to 50. + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. + */ + pageToken?: string; + /** + * Required. The parent for which to list domains, in the format: + * sites/site-name + */ + parent?: string; + } + export interface Params$Resource$Sites$Domains$Update { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the domain association to update or create, if an + * association doesn't already exist. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + + + export class Resource$Sites$Releases { + root: Firebasehosting; + constructor(root: Firebasehosting) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * firebasehosting.sites.releases.create + * @desc Creates a new release which makes the content of the specified + * version actively display on the site. + * @alias firebasehosting.sites.releases.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent The site that the release belongs to, in the format: sites/site-name + * @param {string=} params.versionName The unique identifier for a version, in the format: /sites/site-name/versions/versionID The site-name in this version identifier must match the site-name in the `parent` parameter.

This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * @param {().Release} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Sites$Releases$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Sites$Releases$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Sites$Releases$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Sites$Releases$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Releases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Releases$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/releases') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.releases.list + * @desc Lists the releases that have been created on the specified site. + * @alias firebasehosting.sites.releases.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize The page size to return. Defaults to 100. + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. + * @param {string} params.parent Required. The parent for which to list files, in the format: sites/site-name + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list(params?: Params$Resource$Sites$Releases$List, options?: MethodOptions): + AxiosPromise; + list( + params: Params$Resource$Sites$Releases$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Sites$Releases$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Sites$Releases$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Releases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Releases$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/releases') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sites$Releases$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The site that the release belongs to, in the format: + * sites/site-name + */ + parent?: string; + /** + * The unique identifier for a version, in the format: + * /sites/site-name/versions/versionID + * The site-name in this version identifier must match the + * site-name in the `parent` parameter.

This query + * parameter must be empty if the `type` field in the request body is + * `SITE_DISABLE`. + */ + versionName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Release; + } + export interface Params$Resource$Sites$Releases$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The page size to return. Defaults to 100. + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. + */ + pageToken?: string; + /** + * Required. The parent for which to list files, in the format: + * sites/site-name + */ + parent?: string; + } + + + export class Resource$Sites$Versions { + root: Firebasehosting; + files: Resource$Sites$Versions$Files; + constructor(root: Firebasehosting) { + this.root = root; + this.getRoot.bind(this); + this.files = new Resource$Sites$Versions$Files(root); + } + + getRoot() { + return this.root; + } + + + /** + * firebasehosting.sites.versions.create + * @desc Creates a new version for a site. + * @alias firebasehosting.sites.versions.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The parent to create the version for, in the format: sites/site-name + * @param {string=} params.sizeBytes The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. + * @param {string=} params.versionId A unique id for the new version. This is only specified for legacy version creations. + * @param {().Version} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Sites$Versions$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Sites$Versions$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Sites$Versions$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Sites$Versions$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Versions$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Versions$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/versions') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.versions.delete + * @desc Deletes the specified version. + * @alias firebasehosting.sites.versions.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the version to be deleted, in the format: sites/site-name/versions/versionID + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + delete( + params?: Params$Resource$Sites$Versions$Delete, + options?: MethodOptions): AxiosPromise; + delete( + params: Params$Resource$Sites$Versions$Delete, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + delete( + params: Params$Resource$Sites$Versions$Delete, + callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: Params$Resource$Sites$Versions$Delete| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Versions$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Versions$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.versions.patch + * @desc Updates the specified metadata for a version. Note that this method + * will fail with `FAILED_PRECONDITION` in the event of an invalid state + * transition. The only valid transition for a version is currently from a + * `CREATED` status to a `FINALIZED` status. Use + * [`DeleteVersion`](../sites.versions/delete) to set the status of a + * version to `DELETED`. + * @alias firebasehosting.sites.versions.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The unique identifier for a version, in the format: sites/site-name/versions/versionID This name is provided in the response body when you call the [`CreateVersion`](../sites.versions/create) endpoint. + * @param {string=} params.updateMask A set of field names from your [version](../sites.versions) that you want to update.
A field will be overwritten if, and only if, it's in the mask.
If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. + * @param {().Version} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + patch( + params?: Params$Resource$Sites$Versions$Patch, + options?: MethodOptions): AxiosPromise; + patch( + params: Params$Resource$Sites$Versions$Patch, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + patch( + params: Params$Resource$Sites$Versions$Patch, + callback: BodyResponseCallback): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: Params$Resource$Sites$Versions$Patch| + BodyResponseCallback, + optionsOrCallback?: MethodOptions|BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Versions$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Versions$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * firebasehosting.sites.versions.populateFiles + * @desc Adds content files to a version. + * @alias firebasehosting.sites.versions.populateFiles + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The version to add files to, in the format: sites/site-name/versions/versionID + * @param {().PopulateVersionFilesRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + populateFiles( + params?: Params$Resource$Sites$Versions$Populatefiles, + options?: MethodOptions): + AxiosPromise; + populateFiles( + params: Params$Resource$Sites$Versions$Populatefiles, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + populateFiles( + params: Params$Resource$Sites$Versions$Populatefiles, + callback: BodyResponseCallback): + void; + populateFiles( + callback: BodyResponseCallback): + void; + populateFiles( + paramsOrCallback?: Params$Resource$Sites$Versions$Populatefiles| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Sites$Versions$Populatefiles; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Versions$Populatefiles; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}:populateFiles') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest( + parameters); + } + } + } + + export interface Params$Resource$Sites$Versions$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The parent to create the version for, in the format: + * sites/site-name + */ + parent?: string; + /** + * The self-reported size of the version. This value is used for a + * pre-emptive quota check for legacy version uploads. + */ + sizeBytes?: string; + /** + * A unique id for the new version. This is only specified for legacy + * version creations. + */ + versionId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Version; + } + export interface Params$Resource$Sites$Versions$Delete { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The name of the version to be deleted, in the format: + * sites/site-name/versions/versionID + */ + name?: string; + } + export interface Params$Resource$Sites$Versions$Patch { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The unique identifier for a version, in the format: + * sites/site-name/versions/versionID + * This name is provided in the response body when you call the + * [`CreateVersion`](../sites.versions/create) endpoint. + */ + name?: string; + /** + * A set of field names from your [version](../sites.versions) that you want + * to update.
A field will be overwritten if, and only if, it's in the + * mask.
If a mask is not provided then a default mask of only + * [`status`](../sites.versions#Version.FIELDS.status) will be used. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Version; + } + export interface Params$Resource$Sites$Versions$Populatefiles { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. The version to add files to, in the format: + * sites/site-name/versions/versionID + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PopulateVersionFilesRequest; + } + + export class Resource$Sites$Versions$Files { + root: Firebasehosting; + constructor(root: Firebasehosting) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * firebasehosting.sites.versions.files.list + * @desc Lists the remaining files to be uploaded for the specified version. + * @alias firebasehosting.sites.versions.files.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize The page size to return. Defaults to 1000. + * @param {string=} params.pageToken The next_page_token from a previous request, if provided. This will be the encoded version of a firebase.hosting.proto.metadata.ListFilesPageToken. + * @param {string} params.parent Required. The parent to list files for, in the format: sites/site-name/versions/versionID + * @param {string=} params.status The type of files in the version that should be listed. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Sites$Versions$Files$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Sites$Versions$Files$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Sites$Versions$Files$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Sites$Versions$Files$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Sites$Versions$Files$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Versions$Files$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/files') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sites$Versions$Files$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The page size to return. Defaults to 1000. + */ + pageSize?: number; + /** + * The next_page_token from a previous request, if provided. This will be + * the encoded version of a + * firebase.hosting.proto.metadata.ListFilesPageToken. + */ + pageToken?: string; + /** + * Required. The parent to list files for, in the format: + * sites/site-name/versions/versionID + */ + parent?: string; + /** + * The type of files in the version that should be listed. + */ + status?: string; + } +} diff --git a/src/apis/firebaserules/v1.ts b/src/apis/firebaserules/v1.ts index cf599423327..39eff68734f 100644 --- a/src/apis/firebaserules/v1.ts +++ b/src/apis/firebaserules/v1.ts @@ -163,6 +163,12 @@ export namespace firebaserules_v1 { * `Ruleset` name associated with the `Release` executable. */ rulesetName?: string; + /** + * Optional, indicates the freshness of the result. The response is + * guaranteed to be the latest within an interval up to the sync_time + * (inclusive). + */ + syncTime?: string; /** * Timestamp for the most recent `Release.update_time`. */ @@ -803,7 +809,7 @@ export namespace firebaserules_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.executableVersion The requested runtime executable version. Defaults to FIREBASE_RULES_EXECUTABLE_V1 + * @param {string=} params.executableVersion The requested runtime executable version. Defaults to FIREBASE_RULES_EXECUTABLE_V1. * @param {string} params.name Resource name of the `Release`. Format: `projects/{project_id}/releases/{release_id}` * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -1065,7 +1071,7 @@ export namespace firebaserules_v1 { /** * The requested runtime executable version. Defaults to - * FIREBASE_RULES_EXECUTABLE_V1 + * FIREBASE_RULES_EXECUTABLE_V1. */ executableVersion?: string; /** diff --git a/src/apis/firestore/v1beta2.ts b/src/apis/firestore/v1beta2.ts index 9cf5b7666e7..955713fe7c4 100644 --- a/src/apis/firestore/v1beta2.ts +++ b/src/apis/firestore/v1beta2.ts @@ -73,6 +73,72 @@ export namespace firestore_v1beta2 { * representation for `Empty` is empty JSON object `{}`. */ export interface Schema$Empty {} + /** + * Metadata for google.longrunning.Operation results from + * FirestoreAdmin.ExportDocuments. + */ + export interface Schema$GoogleFirestoreAdminV1beta2ExportDocumentsMetadata { + /** + * Which collection ids are being exported. + */ + collectionIds?: string[]; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + */ + endTime?: string; + /** + * The state of the export operation. + */ + operationState?: string; + /** + * Where the entities are being exported to. + */ + outputUriPrefix?: string; + /** + * The progress, in bytes, of this operation. + */ + progressBytes?: Schema$GoogleFirestoreAdminV1beta2Progress; + /** + * The progress, in documents, of this operation. + */ + progressDocuments?: Schema$GoogleFirestoreAdminV1beta2Progress; + /** + * The time this operation started. + */ + startTime?: string; + } + /** + * The request for FirestoreAdmin.ExportDocuments. + */ + export interface Schema$GoogleFirestoreAdminV1beta2ExportDocumentsRequest { + /** + * Which collection ids to export. Unspecified means all collections. + */ + collectionIds?: string[]; + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the + * name of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an + * optional Google Cloud Storage namespace path. When choosing a name, be + * sure to consider Google Cloud Storage naming guidelines: + * https://cloud.google.com/storage/docs/naming. If the URI is a bucket + * (without a namespace path), a prefix will be generated based on the start + * time. + */ + outputUriPrefix?: string; + } + /** + * Returned in the google.longrunning.Operation response field. + */ + export interface Schema$GoogleFirestoreAdminV1beta2ExportDocumentsResponse { + /** + * Location of the output files. This can be used to begin an import into + * Cloud Firestore (this project or another project) after the operation + * completes successfully. + */ + outputUriPrefix?: string; + } /** * Represents a single field in the database. Fields are grouped by their * "Collection Group", which represent all collections in the @@ -145,6 +211,58 @@ export namespace firestore_v1beta2 { */ state?: string; } + /** + * Metadata for google.longrunning.Operation results from + * FirestoreAdmin.ImportDocuments. + */ + export interface Schema$GoogleFirestoreAdminV1beta2ImportDocumentsMetadata { + /** + * Which collection ids are being imported. + */ + collectionIds?: string[]; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + */ + endTime?: string; + /** + * The location of the documents being imported. + */ + inputUriPrefix?: string; + /** + * The state of the import operation. + */ + operationState?: string; + /** + * The progress, in bytes, of this operation. + */ + progressBytes?: Schema$GoogleFirestoreAdminV1beta2Progress; + /** + * The progress, in documents, of this operation. + */ + progressDocuments?: Schema$GoogleFirestoreAdminV1beta2Progress; + /** + * The time this operation started. + */ + startTime?: string; + } + /** + * The request for FirestoreAdmin.ImportDocuments. + */ + export interface Schema$GoogleFirestoreAdminV1beta2ImportDocumentsRequest { + /** + * Which collection ids to import. Unspecified means all collections + * included in the import. + */ + collectionIds?: string[]; + /** + * Location of the exported files. This must match the output_uri_prefix of + * an ExportDocumentsResponse from an export that has completed + * successfully. See: + * google.firestore.admin.v1beta2.ExportDocumentsResponse.output_uri_prefix. + */ + inputUriPrefix?: string; + } /** * Cloud Firestore indexes enable simple and complex queries against documents * in a database. @@ -431,13 +549,10 @@ export namespace firestore_v1beta2 { export class Resource$Projects$Databases { root: Firestore; - collectionGroup: Resource$Projects$Databases$Collectiongroup; collectionGroups: Resource$Projects$Databases$Collectiongroups; constructor(root: Firestore) { this.root = root; this.getRoot.bind(this); - this.collectionGroup = - new Resource$Projects$Databases$Collectiongroup(root); this.collectionGroups = new Resource$Projects$Databases$Collectiongroups(root); } @@ -445,88 +560,59 @@ export namespace firestore_v1beta2 { getRoot() { return this.root; } - } - - - export class Resource$Projects$Databases$Collectiongroup { - root: Firestore; - indexes: Resource$Projects$Databases$Collectiongroup$Indexes; - constructor(root: Firestore) { - this.root = root; - this.getRoot.bind(this); - this.indexes = - new Resource$Projects$Databases$Collectiongroup$Indexes(root); - } - - getRoot() { - return this.root; - } - } - - - export class Resource$Projects$Databases$Collectiongroup$Indexes { - root: Firestore; - constructor(root: Firestore) { - this.root = root; - this.getRoot.bind(this); - } - - getRoot() { - return this.root; - } /** - * firestore.projects.databases.collectionGroup.indexes.create - * @desc Creates a composite index. This returns a - * google.longrunning.Operation which may be used to track the status of the - * creation. The metadata for the operation will be the type - * IndexOperationMetadata. - * @alias firestore.projects.databases.collectionGroup.indexes.create + * firestore.projects.databases.exportDocuments + * @desc Exports a copy of all or a subset of documents from Google Cloud + * Firestore to another storage system, such as Google Cloud Storage. Recent + * updates to documents may not be reflected in the export. The export + * occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. The output of an export may + * only be used once the associated operation is done. If an export + * operation is cancelled before completion it may leave partial data behind + * in Google Cloud Storage. + * @alias firestore.projects.databases.exportDocuments * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @param {().GoogleFirestoreAdminV1beta2Index} params.resource Request body data + * @param {string} params.name Database to export. Should be of the form: `projects/{project_id}/databases/{database_id}`. + * @param {().GoogleFirestoreAdminV1beta2ExportDocumentsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - create( - params?: - Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create, + exportDocuments( + params?: Params$Resource$Projects$Databases$Exportdocuments, options?: MethodOptions): AxiosPromise; - create( - params: - Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create, + exportDocuments( + params: Params$Resource$Projects$Databases$Exportdocuments, options: MethodOptions| BodyResponseCallback, callback: BodyResponseCallback): void; - create( - params: - Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create, + exportDocuments( + params: Params$Resource$Projects$Databases$Exportdocuments, callback: BodyResponseCallback): void; - create(callback: BodyResponseCallback): + exportDocuments( + callback: BodyResponseCallback): void; - create( - paramsOrCallback?: - Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create| + exportDocuments( + paramsOrCallback?: Params$Resource$Projects$Databases$Exportdocuments| BodyResponseCallback, optionsOrCallback?: MethodOptions| BodyResponseCallback, callback?: BodyResponseCallback): void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create; + Params$Resource$Projects$Databases$Exportdocuments; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create; + params = {} as Params$Resource$Projects$Databases$Exportdocuments; options = {}; } @@ -539,14 +625,14 @@ export namespace firestore_v1beta2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta2/{+parent}/indexes') + url: (rootUrl + '/v1beta2/{+name}:exportDocuments') .replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.getRoot() }; if (callback) { @@ -559,55 +645,54 @@ export namespace firestore_v1beta2 { /** - * firestore.projects.databases.collectionGroup.indexes.list - * @desc Lists composite indexes. - * @alias firestore.projects.databases.collectionGroup.indexes.list + * firestore.projects.databases.importDocuments + * @desc Imports documents into Google Cloud Firestore. Existing documents + * with the same name are overwritten. The import occurs in the background + * and its progress can be monitored and managed via the Operation resource + * that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud + * Firestore. + * @alias firestore.projects.databases.importDocuments * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.filter The filter to apply to list results. - * @param {integer=} params.pageSize The number of results to return. - * @param {string=} params.pageToken A page token, returned from a previous call to FirestoreAdmin.ListIndexes, that may be used to get the next page of results. - * @param {string} params.parent A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param {string} params.name Database to import into. Should be of the form: `projects/{project_id}/databases/{database_id}`. + * @param {().GoogleFirestoreAdminV1beta2ImportDocumentsRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object */ - list( - params?: - Params$Resource$Projects$Databases$Collectiongroup$Indexes$List, + importDocuments( + params?: Params$Resource$Projects$Databases$Importdocuments, options?: MethodOptions): - AxiosPromise; - list( - params: Params$Resource$Projects$Databases$Collectiongroup$Indexes$List, - options: MethodOptions|BodyResponseCallback< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, - callback: BodyResponseCallback< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; - list( - params: Params$Resource$Projects$Databases$Collectiongroup$Indexes$List, - callback: BodyResponseCallback< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; - list(callback: BodyResponseCallback< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; - list( - paramsOrCallback?: - Params$Resource$Projects$Databases$Collectiongroup$Indexes$List| - BodyResponseCallback< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, - optionsOrCallback?: MethodOptions|BodyResponseCallback< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, - callback?: BodyResponseCallback< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void| - AxiosPromise { + AxiosPromise; + importDocuments( + params: Params$Resource$Projects$Databases$Importdocuments, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + importDocuments( + params: Params$Resource$Projects$Databases$Importdocuments, + callback: BodyResponseCallback): + void; + importDocuments( + callback: BodyResponseCallback): + void; + importDocuments( + paramsOrCallback?: Params$Resource$Projects$Databases$Importdocuments| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { let params = (paramsOrCallback || {}) as - Params$Resource$Projects$Databases$Collectiongroup$Indexes$List; + Params$Resource$Projects$Databases$Importdocuments; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as - Params$Resource$Projects$Databases$Collectiongroup$Indexes$List; + params = {} as Params$Resource$Projects$Databases$Importdocuments; options = {}; } @@ -620,72 +705,60 @@ export namespace firestore_v1beta2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta2/{+parent}/indexes') + url: (rootUrl + '/v1beta2/{+name}:importDocuments') .replace(/([^:]\/)\/+/g, '$1'), - method: 'GET' + method: 'POST' }, options), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.getRoot() }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback); } else { - return createAPIRequest< - Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Projects$Databases$Collectiongroup$Indexes$Create { + export interface Params$Resource$Projects$Databases$Exportdocuments { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. */ - parent?: string; + name?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleFirestoreAdminV1beta2Index; + requestBody?: Schema$GoogleFirestoreAdminV1beta2ExportDocumentsRequest; } - export interface Params$Resource$Projects$Databases$Collectiongroup$Indexes$List { + export interface Params$Resource$Projects$Databases$Importdocuments { /** * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; /** - * The filter to apply to list results. - */ - filter?: string; - /** - * The number of results to return. - */ - pageSize?: number; - /** - * A page token, returned from a previous call to - * FirestoreAdmin.ListIndexes, that may be used to get the next page of - * results. + * Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. */ - pageToken?: string; + name?: string; + /** - * A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Request body metadata */ - parent?: string; + requestBody?: Schema$GoogleFirestoreAdminV1beta2ImportDocumentsRequest; } - - export class Resource$Projects$Databases$Collectiongroups { root: Firestore; fields: Resource$Projects$Databases$Collectiongroups$Fields; @@ -1059,6 +1132,88 @@ export namespace firestore_v1beta2 { } + /** + * firestore.projects.databases.collectionGroups.indexes.create + * @desc Creates a composite index. This returns a + * google.longrunning.Operation which may be used to track the status of the + * creation. The metadata for the operation will be the type + * IndexOperationMetadata. + * @alias firestore.projects.databases.collectionGroups.indexes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param {().GoogleFirestoreAdminV1beta2Index} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Create, + options?: MethodOptions): + AxiosPromise; + create( + params: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Create, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): + void; + create( + params: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Create, + callback: BodyResponseCallback): + void; + create(callback: BodyResponseCallback): + void; + create( + paramsOrCallback?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta2/{+parent}/indexes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** * firestore.projects.databases.collectionGroups.indexes.delete * @desc Deletes a composite index. @@ -1203,8 +1358,109 @@ export namespace firestore_v1beta2 { parameters); } } + + + /** + * firestore.projects.databases.collectionGroups.indexes.list + * @desc Lists composite indexes. + * @alias firestore.projects.databases.collectionGroups.indexes.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The filter to apply to list results. + * @param {integer=} params.pageSize The number of results to return. + * @param {string=} params.pageToken A page token, returned from a previous call to FirestoreAdmin.ListIndexes, that may be used to get the next page of results. + * @param {string} params.parent A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$List, + options?: MethodOptions): + AxiosPromise; + list( + params: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$List, + options: MethodOptions|BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, + callback: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; + list( + params: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$List, + callback: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; + list(callback: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void; + list( + paramsOrCallback?: + Params$Resource$Projects$Databases$Collectiongroups$Indexes$List| + BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, + optionsOrCallback?: MethodOptions|BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>, + callback?: BodyResponseCallback< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>): void| + AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as + Params$Resource$Projects$Databases$Collectiongroups$Indexes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://firestore.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta2/{+parent}/indexes') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest( + parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleFirestoreAdminV1beta2ListIndexesResponse>(parameters); + } + } } + export interface Params$Resource$Projects$Databases$Collectiongroups$Indexes$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleFirestoreAdminV1beta2Index; + } export interface Params$Resource$Projects$Databases$Collectiongroups$Indexes$Delete { /** * Auth client or API Key for the request @@ -1229,4 +1485,30 @@ export namespace firestore_v1beta2 { */ name?: string; } + export interface Params$Resource$Projects$Databases$Collectiongroups$Indexes$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The filter to apply to list results. + */ + filter?: string; + /** + * The number of results to return. + */ + pageSize?: number; + /** + * A page token, returned from a previous call to + * FirestoreAdmin.ListIndexes, that may be used to get the next page of + * results. + */ + pageToken?: string; + /** + * A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + */ + parent?: string; + } } diff --git a/src/apis/games/v1.ts b/src/apis/games/v1.ts index 2da8eb7d442..4a329ec9f0d 100644 --- a/src/apis/games/v1.ts +++ b/src/apis/games/v1.ts @@ -3705,6 +3705,7 @@ export namespace games_v1 { * @memberOf! () * * @param {object=} params Parameters for request + * @param {string=} params.builtinGameId Override used only by built-in games in Play Games application. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. * @return {object} Request object @@ -3858,6 +3859,11 @@ export namespace games_v1 { * Auth client or API Key for the request */ auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Override used only by built-in games in Play Games application. + */ + builtinGameId?: string; } export interface Params$Resource$Applications$Verify { /** diff --git a/src/apis/iam/v1.ts b/src/apis/iam/v1.ts index 0fac9c7e843..640b2bc1a1a 100644 --- a/src/apis/iam/v1.ts +++ b/src/apis/iam/v1.ts @@ -668,8 +668,8 @@ export namespace iam_v1 { */ export interface Schema$ServiceAccount { /** - * Optional. A user-specified description of the service account. Must be - * fewer than 100 UTF-8 bytes. + * Optional. A user-specified name for the service account. Must be less + * than or equal to 100 UTF-8 bytes. */ displayName?: string; /** @@ -677,7 +677,8 @@ export namespace iam_v1 { */ email?: string; /** - * Used to perform a consistent read-modify-write. + * Optional. Note: `etag` is an inoperable legacy field that is only + * returned for backwards compatibility. */ etag?: string; /** diff --git a/src/apis/iamcredentials/v1.ts b/src/apis/iamcredentials/v1.ts index bba7690e442..7314490f120 100644 --- a/src/apis/iamcredentials/v1.ts +++ b/src/apis/iamcredentials/v1.ts @@ -267,7 +267,7 @@ export namespace iamcredentials_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a wildcard for the project will infer the project from the account. + * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. * @param {().GenerateAccessTokenRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -345,7 +345,7 @@ export namespace iamcredentials_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Use hyphen as placeholder for project id since there is no project context for this API. + * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. * @param {().GenerateIdentityBindingAccessTokenRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -428,7 +428,7 @@ export namespace iamcredentials_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a wildcard for the project will infer the project from the account. + * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. * @param {().GenerateIdTokenRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -500,7 +500,7 @@ export namespace iamcredentials_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a wildcard for the project will infer the project from the account. + * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. * @param {().SignBlobRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -569,7 +569,7 @@ export namespace iamcredentials_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a wildcard for the project will infer the project from the account. + * @param {string} params.name The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. * @param {().SignJwtRequest} params.resource Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -640,8 +640,7 @@ export namespace iamcredentials_v1 { /** * The resource name of the service account for which the credentials are * requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a - * wildcard for the project will infer the project from the account. + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. */ name?: string; @@ -659,9 +658,7 @@ export namespace iamcredentials_v1 { /** * The resource name of the service account for which the credentials are * requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Use hyphen as - * placeholder for project id since there is no project context for this - * API. + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. */ name?: string; @@ -679,8 +676,7 @@ export namespace iamcredentials_v1 { /** * The resource name of the service account for which the credentials are * requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a - * wildcard for the project will infer the project from the account. + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. */ name?: string; @@ -698,8 +694,7 @@ export namespace iamcredentials_v1 { /** * The resource name of the service account for which the credentials are * requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a - * wildcard for the project will infer the project from the account. + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. */ name?: string; @@ -717,8 +712,7 @@ export namespace iamcredentials_v1 { /** * The resource name of the service account for which the credentials are * requested, in the following format: - * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. Using `-` as a - * wildcard for the project will infer the project from the account. + * `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. */ name?: string; diff --git a/src/apis/index.ts b/src/apis/index.ts index 0685491f887..971681c6e0e 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -17,12 +17,14 @@ import {getAPI, ServiceOptions} from 'googleapis-common'; import * as abusiveexperiencereport from './abusiveexperiencereport'; import * as acceleratedmobilepageurl from './acceleratedmobilepageurl'; +import * as accesscontextmanager from './accesscontextmanager'; import * as adexchangebuyer from './adexchangebuyer'; import * as adexchangebuyer2 from './adexchangebuyer2'; import * as adexperiencereport from './adexperiencereport'; import * as admin from './admin'; import * as adsense from './adsense'; import * as adsensehost from './adsensehost'; +import * as alertcenter from './alertcenter'; import * as analytics from './analytics'; import * as analyticsreporting from './analyticsreporting'; import * as androiddeviceprovisioning from './androiddeviceprovisioning'; @@ -41,6 +43,7 @@ import * as calendar from './calendar'; import * as chat from './chat'; import * as civicinfo from './civicinfo'; import * as classroom from './classroom'; +import * as cloudasset from './cloudasset'; import * as cloudbilling from './cloudbilling'; import * as cloudbuild from './cloudbuild'; import * as clouddebugger from './clouddebugger'; @@ -73,6 +76,7 @@ import * as doubleclicksearch from './doubleclicksearch'; import * as drive from './drive'; import * as file from './file'; import * as firebasedynamiclinks from './firebasedynamiclinks'; +import * as firebasehosting from './firebasehosting'; import * as firebaserules from './firebaserules'; import * as firestore from './firestore'; import * as fitness from './fitness'; @@ -121,6 +125,7 @@ import * as servicebroker from './servicebroker'; import * as serviceconsumermanagement from './serviceconsumermanagement'; import * as servicecontrol from './servicecontrol'; import * as servicemanagement from './servicemanagement'; +import * as servicenetworking from './servicenetworking'; import * as serviceusage from './serviceusage'; import * as serviceuser from './serviceuser'; import * as sheets from './sheets'; @@ -160,12 +165,14 @@ export interface APIList { export const APIS: APIList = { abusiveexperiencereport: abusiveexperiencereport.VERSIONS, acceleratedmobilepageurl: acceleratedmobilepageurl.VERSIONS, + accesscontextmanager: accesscontextmanager.VERSIONS, adexchangebuyer: adexchangebuyer.VERSIONS, adexchangebuyer2: adexchangebuyer2.VERSIONS, adexperiencereport: adexperiencereport.VERSIONS, admin: admin.VERSIONS, adsense: adsense.VERSIONS, adsensehost: adsensehost.VERSIONS, + alertcenter: alertcenter.VERSIONS, analytics: analytics.VERSIONS, analyticsreporting: analyticsreporting.VERSIONS, androiddeviceprovisioning: androiddeviceprovisioning.VERSIONS, @@ -184,6 +191,7 @@ export const APIS: APIList = { chat: chat.VERSIONS, civicinfo: civicinfo.VERSIONS, classroom: classroom.VERSIONS, + cloudasset: cloudasset.VERSIONS, cloudbilling: cloudbilling.VERSIONS, cloudbuild: cloudbuild.VERSIONS, clouddebugger: clouddebugger.VERSIONS, @@ -216,6 +224,7 @@ export const APIS: APIList = { drive: drive.VERSIONS, file: file.VERSIONS, firebasedynamiclinks: firebasedynamiclinks.VERSIONS, + firebasehosting: firebasehosting.VERSIONS, firebaserules: firebaserules.VERSIONS, firestore: firestore.VERSIONS, fitness: fitness.VERSIONS, @@ -264,6 +273,7 @@ export const APIS: APIList = { serviceconsumermanagement: serviceconsumermanagement.VERSIONS, servicecontrol: servicecontrol.VERSIONS, servicemanagement: servicemanagement.VERSIONS, + servicenetworking: servicenetworking.VERSIONS, serviceusage: serviceusage.VERSIONS, serviceuser: serviceuser.VERSIONS, sheets: sheets.VERSIONS, @@ -299,12 +309,14 @@ export const APIS: APIList = { export class GeneratedAPIs { abusiveexperiencereport = abusiveexperiencereport.abusiveexperiencereport; acceleratedmobilepageurl = acceleratedmobilepageurl.acceleratedmobilepageurl; + accesscontextmanager = accesscontextmanager.accesscontextmanager; adexchangebuyer = adexchangebuyer.adexchangebuyer; adexchangebuyer2 = adexchangebuyer2.adexchangebuyer2; adexperiencereport = adexperiencereport.adexperiencereport; admin = admin.admin; adsense = adsense.adsense; adsensehost = adsensehost.adsensehost; + alertcenter = alertcenter.alertcenter; analytics = analytics.analytics; analyticsreporting = analyticsreporting.analyticsreporting; androiddeviceprovisioning = @@ -324,6 +336,7 @@ export class GeneratedAPIs { chat = chat.chat; civicinfo = civicinfo.civicinfo; classroom = classroom.classroom; + cloudasset = cloudasset.cloudasset; cloudbilling = cloudbilling.cloudbilling; cloudbuild = cloudbuild.cloudbuild; clouddebugger = clouddebugger.clouddebugger; @@ -356,6 +369,7 @@ export class GeneratedAPIs { drive = drive.drive; file = file.file; firebasedynamiclinks = firebasedynamiclinks.firebasedynamiclinks; + firebasehosting = firebasehosting.firebasehosting; firebaserules = firebaserules.firebaserules; firestore = firestore.firestore; fitness = fitness.fitness; @@ -405,6 +419,7 @@ export class GeneratedAPIs { serviceconsumermanagement.serviceconsumermanagement; servicecontrol = servicecontrol.servicecontrol; servicemanagement = servicemanagement.servicemanagement; + servicenetworking = servicenetworking.servicenetworking; serviceusage = serviceusage.serviceusage; serviceuser = serviceuser.serviceuser; sheets = sheets.sheets; @@ -438,12 +453,14 @@ export class GeneratedAPIs { constructor() { this.abusiveexperiencereport = this.abusiveexperiencereport.bind(this); this.acceleratedmobilepageurl = this.acceleratedmobilepageurl.bind(this); + this.accesscontextmanager = this.accesscontextmanager.bind(this); this.adexchangebuyer = this.adexchangebuyer.bind(this); this.adexchangebuyer2 = this.adexchangebuyer2.bind(this); this.adexperiencereport = this.adexperiencereport.bind(this); this.admin = this.admin.bind(this); this.adsense = this.adsense.bind(this); this.adsensehost = this.adsensehost.bind(this); + this.alertcenter = this.alertcenter.bind(this); this.analytics = this.analytics.bind(this); this.analyticsreporting = this.analyticsreporting.bind(this); this.androiddeviceprovisioning = this.androiddeviceprovisioning.bind(this); @@ -462,6 +479,7 @@ export class GeneratedAPIs { this.chat = this.chat.bind(this); this.civicinfo = this.civicinfo.bind(this); this.classroom = this.classroom.bind(this); + this.cloudasset = this.cloudasset.bind(this); this.cloudbilling = this.cloudbilling.bind(this); this.cloudbuild = this.cloudbuild.bind(this); this.clouddebugger = this.clouddebugger.bind(this); @@ -494,6 +512,7 @@ export class GeneratedAPIs { this.drive = this.drive.bind(this); this.file = this.file.bind(this); this.firebasedynamiclinks = this.firebasedynamiclinks.bind(this); + this.firebasehosting = this.firebasehosting.bind(this); this.firebaserules = this.firebaserules.bind(this); this.firestore = this.firestore.bind(this); this.fitness = this.fitness.bind(this); @@ -542,6 +561,7 @@ export class GeneratedAPIs { this.serviceconsumermanagement = this.serviceconsumermanagement.bind(this); this.servicecontrol = this.servicecontrol.bind(this); this.servicemanagement = this.servicemanagement.bind(this); + this.servicenetworking = this.servicenetworking.bind(this); this.serviceusage = this.serviceusage.bind(this); this.serviceuser = this.serviceuser.bind(this); this.sheets = this.sheets.bind(this); diff --git a/src/apis/jobs/v2.ts b/src/apis/jobs/v2.ts index 0fefdf342df..0abda5289f5 100644 --- a/src/apis/jobs/v2.ts +++ b/src/apis/jobs/v2.ts @@ -608,23 +608,25 @@ export namespace jobs_v2 { type?: string; } /** - * Represents a whole calendar date, for example date of birth. The time of + * Represents a whole or partial calendar date, e.g. a birthday. The time of * day and time zone are either specified elsewhere or are not significant. - * The date is relative to the Proleptic Gregorian Calendar. The day can be 0 - * to represent a year and month where the day is not significant, for example - * credit card expiration date. The year can be 0 to represent a month and day - * independent of year, for example anniversary date. Related types are + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** @@ -1153,8 +1155,9 @@ export namespace jobs_v2 { * codes must be in BCP-47 format, such as "en-US" or * "sr-Latn". For more information, see [Tags for Identifying * Languages](https://tools.ietf.org/html/bcp47){: - * class="external" target="_blank" }. The default - * value is `en-US`. + * class="external" target="_blank" }. If this field is + * unspecified and Job.description is present, detected language code based + * on Job.description is assigned, otherwise defaults to 'en_US'. */ languageCode?: string; /** @@ -1316,7 +1319,7 @@ export namespace jobs_v2 { * expressions (AND/OR/NOT) are supported up to 3 levels of nesting (For * example, "((A AND B AND C) OR NOT D) AND E"), and there can be * a maximum of 50 comparisons/functions in the expression. The expression - * must be < 2000 characters in length. Sample Query: (key1 = + * must be < 3000 characters in length. Sample Query: (key1 = * "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1)) AND * key2 > 100 */ diff --git a/src/apis/jobs/v3.ts b/src/apis/jobs/v3.ts index a0e7e0c8a04..2d49a73ac59 100644 --- a/src/apis/jobs/v3.ts +++ b/src/apis/jobs/v3.ts @@ -730,8 +730,9 @@ export namespace jobs_v3 { * codes must be in BCP-47 format, such as "en-US" or * "sr-Latn". For more information, see [Tags for Identifying * Languages](https://tools.ietf.org/html/bcp47){: - * class="external" target="_blank" }. The default - * value is `en-US`. + * class="external" target="_blank" }. If this field is + * unspecified and Job.description is present, detected language code based + * on Job.description is assigned, otherwise defaults to 'en_US'. */ languageCode?: string; /** @@ -897,17 +898,18 @@ export namespace jobs_v3 { /** * Optional. This filter specifies a structured syntax to match against the * Job.custom_attributes marked as `filterable`. The syntax for this - * expression is a subset of Google SQL syntax. Supported operators are: =, - * !=, <, <=, >, >= where the left of the operator is a custom - * field key and the right of the operator is a number or string (surrounded - * by quotes) value. Supported functions are LOWER(<field_name>) to - * perform case insensitive match and EMPTY(<field_name>) to filter on - * the existence of a key. Boolean expressions (AND/OR/NOT) are supported - * up to 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) - * AND E"), a maximum of 50 comparisons/functions are allowed in the - * expression. The expression must be < 2000 characters in length. Sample - * Query: (LOWER(driving_license)="class a" OR - * EMPTY(driving_license)) AND driving_years > 10 + * expression is a subset of SQL syntax. Supported operators are: `=`, + * `!=`, `<`, `<=`, `>`, and `>=` where the left of the operator + * is a custom field key and the right of the operator is a number or a + * quoted string. You must escape backslash (\\) and quote (\") + * characters. Supported functions are `LOWER([field_name])` to perform a + * case insensitive match and `EMPTY([field_name])` to filter on the + * existence of a key. Boolean expressions (AND/OR/NOT) are supported up to + * 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) AND + * E"), a maximum of 50 comparisons or functions are allowed in the + * expression. The expression must be < 3000 characters in length. Sample + * Query: `(LOWER(driving_license)="class \"a\"" OR + * EMPTY(driving_license)) AND driving_years > 10` */ customAttributeFilter?: string; /** @@ -1434,21 +1436,21 @@ export namespace jobs_v3 { * Default is "relevance desc". Supported options are: * * "relevance desc": By relevance descending, as determined by the * API algorithms. Relevance thresholding of query results is only available - * with this ordering. * "posting_publish_time desc": By - * Job.posting_publish_time descending. * "posting_update_time + * with this ordering. * "posting`_`publish`_`time desc": By + * Job.posting_publish_time descending. * "posting`_`update`_`time * desc": By Job.posting_update_time descending. * "title": * By Job.title ascending. * "title desc": By Job.title - * descending. * "annualized_base_compensation": By job's + * descending. * "annualized`_`base`_`compensation": By job's * CompensationInfo.annualized_base_compensation_range ascending. Jobs whose * annualized base compensation is unspecified are put at the end of search - * results. * "annualized_base_compensation desc": By job's - * CompensationInfo.annualized_base_compensation_range descending. Jobs - * whose annualized base compensation is unspecified are put at the end of - * search results. * "annualized_total_compensation": By job's - * CompensationInfo.annualized_total_compensation_range ascending. Jobs - * whose annualized base compensation is unspecified are put at the end of - * search results. * "annualized_total_compensation desc": By - * job's CompensationInfo.annualized_total_compensation_range + * results. * "annualized`_`base`_`compensation desc": By + * job's CompensationInfo.annualized_base_compensation_range descending. + * Jobs whose annualized base compensation is unspecified are put at the end + * of search results. * "annualized`_`total`_`compensation": By + * job's CompensationInfo.annualized_total_compensation_range ascending. + * Jobs whose annualized base compensation is unspecified are put at the end + * of search results. * "annualized`_`total`_`compensation desc": + * By job's CompensationInfo.annualized_total_compensation_range * descending. Jobs whose annualized base compensation is unspecified are * put at the end of search results. */ @@ -1538,7 +1540,7 @@ export namespace jobs_v3 { /** * The precise result count, which is available only if the client set * enable_precise_result_size to `true` or if the response is the last page - * of results. Otherwise, the value will be `-1`. + * of results. Otherwise, the value is `-1`. */ totalSize?: number; } diff --git a/src/apis/jobs/v3p1beta1.ts b/src/apis/jobs/v3p1beta1.ts index b5d63ad46d5..b0c363c2b2c 100644 --- a/src/apis/jobs/v3p1beta1.ts +++ b/src/apis/jobs/v3p1beta1.ts @@ -595,7 +595,7 @@ export namespace jobs_v3p1beta1 { /** * Required. Controls over how important the score of * CustomRankingInfo.ranking_expression gets applied to job's final - * ranking position. An error will be thrown if not specified. + * ranking position. An error is thrown if not specified. */ importanceLevel?: string; /** @@ -905,8 +905,9 @@ export namespace jobs_v3p1beta1 { * codes must be in BCP-47 format, such as "en-US" or * "sr-Latn". For more information, see [Tags for Identifying * Languages](https://tools.ietf.org/html/bcp47){: - * class="external" target="_blank" }. The default - * value is `en-US`. + * class="external" target="_blank" }. If this field is + * unspecified and Job.description is present, detected language code based + * on Job.description is assigned, otherwise defaults to 'en_US'. */ languageCode?: string; /** @@ -1089,17 +1090,18 @@ export namespace jobs_v3p1beta1 { /** * Optional. This filter specifies a structured syntax to match against the * Job.custom_attributes marked as `filterable`. The syntax for this - * expression is a subset of Google SQL syntax. Supported operators are: =, - * !=, <, <=, >, >= where the left of the operator is a custom - * field key and the right of the operator is a number or string (surrounded - * by quotes) value. Supported functions are LOWER(<field_name>) to - * perform case insensitive match and EMPTY(<field_name>) to filter on - * the existence of a key. Boolean expressions (AND/OR/NOT) are supported - * up to 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) - * AND E"), a maximum of 50 comparisons/functions are allowed in the - * expression. The expression must be < 2000 characters in length. Sample - * Query: (LOWER(driving_license)="class a" OR - * EMPTY(driving_license)) AND driving_years > 10 + * expression is a subset of SQL syntax. Supported operators are: `=`, + * `!=`, `<`, `<=`, `>`, and `>=` where the left of the operator + * is a custom field key and the right of the operator is a number or a + * quoted string. You must escape backslash (\\) and quote (\") + * characters. Supported functions are `LOWER([field_name])` to perform a + * case insensitive match and `EMPTY([field_name])` to filter on the + * existence of a key. Boolean expressions (AND/OR/NOT) are supported up to + * 3 levels of nesting (for example, "((A AND B AND C) OR NOT D) AND + * E"), a maximum of 50 comparisons or functions are allowed in the + * expression. The expression must be < 3000 characters in length. Sample + * Query: `(LOWER(driving_license)="class \"a\"" OR + * EMPTY(driving_license)) AND driving_years > 10` */ customAttributeFilter?: string; /** @@ -1117,6 +1119,11 @@ export namespace jobs_v3p1beta1 { * of the specified employment types. */ employmentTypes?: string[]; + /** + * Optional. This filter specifies a list of job names to be excluded + * during search. At most 200 excluded job names are allowed. + */ + excludedJobs?: string[]; /** * Optional. The category filter specifies the categories of jobs to search * against. See Category for more information. If a value is not specified, @@ -1596,6 +1603,16 @@ export namespace jobs_v3p1beta1 { * match improves recall of subsequent search requests. Defaults to false. */ disableKeywordMatch?: boolean; + /** + * Optional. Controls whether highly similar jobs are returned next to each + * other in the search results. Jobs are determined to be highly similar + * based on their titles, job categories, and locations. Highly similar + * results will be clustered so that only one representative job of the + * cluster will be displayed to the job seeker higher up in the results, + * with the other jobs being displayed lower down in the results. Defaults + * to DiversificationLevel.SIMPLE if no value is specified. + */ + diversificationLevel?: string; /** * Optional. Controls whether to broaden the search when it produces sparse * results. Broadened queries append results to the end of the matching @@ -1636,23 +1653,23 @@ export namespace jobs_v3p1beta1 { * Default is "relevance desc". Supported options are: * * "relevance desc": By relevance descending, as determined by the * API algorithms. Relevance thresholding of query results is only available - * with this ordering. * "posting_publish_time desc": By - * Job.posting_publish_time descending. * "posting_update_time + * with this ordering. * "posting`_`publish`_`time desc": By + * Job.posting_publish_time descending. * "posting`_`update`_`time * desc": By Job.posting_update_time descending. * "title": * By Job.title ascending. * "title desc": By Job.title - * descending. * "annualized_base_compensation": By job's + * descending. * "annualized`_`base`_`compensation": By job's * CompensationInfo.annualized_base_compensation_range ascending. Jobs whose * annualized base compensation is unspecified are put at the end of search - * results. * "annualized_base_compensation desc": By job's - * CompensationInfo.annualized_base_compensation_range descending. Jobs - * whose annualized base compensation is unspecified are put at the end of - * search results. * "annualized_total_compensation": By job's - * CompensationInfo.annualized_total_compensation_range ascending. Jobs - * whose annualized base compensation is unspecified are put at the end of - * search results. * "annualized_total_compensation desc": By - * job's CompensationInfo.annualized_total_compensation_range + * results. * "annualized`_`base`_`compensation desc": By + * job's CompensationInfo.annualized_base_compensation_range descending. + * Jobs whose annualized base compensation is unspecified are put at the end + * of search results. * "annualized`_`total`_`compensation": By + * job's CompensationInfo.annualized_total_compensation_range ascending. + * Jobs whose annualized base compensation is unspecified are put at the end + * of search results. * "annualized`_`total`_`compensation desc": + * By job's CompensationInfo.annualized_total_compensation_range * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. * "custom_ranking desc": By + * put at the end of search results. * "custom`_`ranking desc": By * the relevance score adjusted to the * SearchJobsRequest.custom_ranking_info.ranking_expression with weight * factor assigned by SearchJobsRequest.custom_ranking_info.importance_level @@ -1749,7 +1766,7 @@ export namespace jobs_v3p1beta1 { /** * The precise result count, which is available only if the client set * enable_precise_result_size to `true` or if the response is the last page - * of results. Otherwise, the value will be `-1`. + * of results. Otherwise, the value is `-1`. */ totalSize?: number; } diff --git a/src/apis/logging/v2.ts b/src/apis/logging/v2.ts index 48c35dcd68a..14d1498e8e8 100644 --- a/src/apis/logging/v2.ts +++ b/src/apis/logging/v2.ts @@ -545,6 +545,15 @@ export namespace logging_v2 { * projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 */ trace?: string; + /** + * Optional. The sampling decision of the trace associated with the log + * entry. True means that the trace resource name in the trace field was + * sampled for storage in a trace backend. False means that the trace was + * not sampled for storage when this log entry was written, or the sampling + * decision was unknown at the time. A non-sampled trace value is still + * useful as a request correlation identifier. The default is False. + */ + traceSampled?: boolean; } /** * Additional information about a potentially long-running operation with diff --git a/src/apis/logging/v2beta1.ts b/src/apis/logging/v2beta1.ts index b3ed8a2ad29..a401ed83cd1 100644 --- a/src/apis/logging/v2beta1.ts +++ b/src/apis/logging/v2beta1.ts @@ -522,6 +522,15 @@ export namespace logging_v2beta1 { * projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824 */ trace?: string; + /** + * Optional. The sampling decision of the trace associated with the log + * entry. True means that the trace resource name in the trace field was + * sampled for storage in a trace backend. False means that the trace was + * not sampled for storage when this log entry was written, or the sampling + * decision was unknown at the time. A non-sampled trace value is still + * useful as a request correlation identifier. The default is False. + */ + traceSampled?: boolean; } /** * Additional information about a potentially long-running operation with diff --git a/src/apis/ml/v1.ts b/src/apis/ml/v1.ts index d8ab6c3a291..efce824d80d 100644 --- a/src/apis/ml/v1.ts +++ b/src/apis/ml/v1.ts @@ -550,7 +550,7 @@ export namespace ml_v1 { type?: string; } /** - * Represents input parameters for a prediction job. + * Represents input parameters for a prediction job. Next field: 19 */ export interface Schema$GoogleCloudMlV1__PredictionInput { /** diff --git a/src/apis/monitoring/v3.ts b/src/apis/monitoring/v3.ts index 26bfe7c736a..1d6f8af0968 100644 --- a/src/apis/monitoring/v3.ts +++ b/src/apis/monitoring/v3.ts @@ -791,15 +791,14 @@ export namespace monitoring_v3 { useSsl?: boolean; } /** - * Nimbus InternalCheckers. + * Nimbus InternalCheckers. The API currently only allows reading of internal + * checkers, creation of internal checkers is a manual process. */ export interface Schema$InternalChecker { /** - * The checker ID. - */ - checkerId?: string; - /** - * The checker's human-readable name. + * The checker's human-readable name. The display name should be unique + * within a Stackdriver Workspace in order to make it easier to identify; + * however, uniqueness is not enforced. */ displayName?: string; /** @@ -808,14 +807,17 @@ export namespace monitoring_v3 { */ gcpZone?: string; /** - * The internal network to perform this uptime check on. + * A unique resource name for this InternalChecker. The format + * is:projects/[PROJECT_ID]/internalCheckers/[CHECKER_ID].PROJECT_ID is the + * GCP project ID where the internal resource lives. Not necessarily the + * same as the project_id for the config. */ - network?: string; + name?: string; /** - * The GCP project ID. Not necessarily the same as the project_id for the - * config. + * The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) where the + * internal resource lives (ex: "default"). */ - projectId?: string; + network?: string; } /** * A description of a label. @@ -1299,7 +1301,8 @@ export namespace monitoring_v3 { /** * Required. The monitored resource type. This field must match the type * field of a MonitoredResourceDescriptor object. For example, the type of a - * Compute Engine VM instance is gce_instance. + * Compute Engine VM instance is gce_instance. For a list of types, see + * Monitoring resource types and Logging resource types. */ type?: string; } @@ -1824,7 +1827,7 @@ export namespace monitoring_v3 { contentMatchers?: Schema$ContentMatcher[]; /** * A human-friendly name for the uptime check configuration. The display - * name should be unique within a Stackdriver Account in order to make it + * name should be unique within a Stackdriver Workspace in order to make it * easier to identify; however, uniqueness is not enforced. Required. */ displayName?: string; diff --git a/src/apis/partners/v2.ts b/src/apis/partners/v2.ts index 9f401ead7ef..1abe0309010 100644 --- a/src/apis/partners/v2.ts +++ b/src/apis/partners/v2.ts @@ -512,23 +512,25 @@ export namespace partners_v2 { responseMetadata?: Schema$ResponseMetadata; } /** - * Represents a whole calendar date, for example date of birth. The time of + * Represents a whole or partial calendar date, e.g. a birthday. The time of * day and time zone are either specified elsewhere or are not significant. - * The date is relative to the Proleptic Gregorian Calendar. The day can be 0 - * to represent a year and month where the day is not significant, for example - * credit card expiration date. The year can be 0 to represent a month and day - * independent of year, for example anniversary date. Related types are + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** diff --git a/src/apis/proximitybeacon/v1beta1.ts b/src/apis/proximitybeacon/v1beta1.ts index 0e09f8956f2..955ff2e56d5 100644 --- a/src/apis/proximitybeacon/v1beta1.ts +++ b/src/apis/proximitybeacon/v1beta1.ts @@ -262,23 +262,25 @@ export namespace proximitybeacon_v1beta1 { beaconName?: string; } /** - * Represents a whole calendar date, for example date of birth. The time of + * Represents a whole or partial calendar date, e.g. a birthday. The time of * day and time zone are either specified elsewhere or are not significant. - * The date is relative to the Proleptic Gregorian Calendar. The day can be 0 - * to represent a year and month where the day is not significant, for example - * credit card expiration date. The year can be 0 to represent a month and day - * independent of year, for example anniversary date. Related types are + * The date is relative to the Proleptic Gregorian Calendar. This can + * represent: * A full date, with non-zero year, month and day values * A + * month and day value, with a zero year, e.g. an anniversary * A year on its + * own, with zero month and day values * A year and month value, with a zero + * day, e.g. a credit card expiration date Related types are * google.type.TimeOfDay and `google.protobuf.Timestamp`. */ export interface Schema$Date { /** * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - * if specifying a year/month where the day is not significant. + * if specifying a year by itself or a year and month where the day is not + * significant. */ day?: number; /** - * Month of year. Must be from 1 to 12, or 0 if specifying a date without a - * month. + * Month of year. Must be from 1 to 12, or 0 if specifying a year without a + * month and day. */ month?: number; /** diff --git a/src/apis/redis/v1.ts b/src/apis/redis/v1.ts index 5ecbb14f65d..975b415d11c 100644 --- a/src/apis/redis/v1.ts +++ b/src/apis/redis/v1.ts @@ -97,7 +97,7 @@ export namespace redis_v1 { */ apiVersion?: string; /** - * Specifies if cancellation was requested for the operaiton. + * Specifies if cancellation was requested for the operation. */ cancelRequested?: boolean; /** diff --git a/src/apis/serviceconsumermanagement/README.md b/src/apis/serviceconsumermanagement/README.md index 27096c2490d..93166d7bf1d 100644 --- a/src/apis/serviceconsumermanagement/README.md +++ b/src/apis/serviceconsumermanagement/README.md @@ -2,7 +2,7 @@ # @google/serviceconsumermanagement -> Provides management methods for configuring service producer resources on Google Cloud. +> Manages the service consumers of a Service Infrastructure service. ## Installation diff --git a/src/apis/serviceconsumermanagement/v1.ts b/src/apis/serviceconsumermanagement/v1.ts index 593588ba980..57124f14b6f 100644 --- a/src/apis/serviceconsumermanagement/v1.ts +++ b/src/apis/serviceconsumermanagement/v1.ts @@ -32,8 +32,7 @@ export namespace serviceconsumermanagement_v1 { /** * Service Consumer Management API * - * Provides management methods for configuring service producer resources on - * Google Cloud. + * Manages the service consumers of a Service Infrastructure service. * * @example * const {google} = require('googleapis'); @@ -775,7 +774,7 @@ export namespace serviceconsumermanagement_v1 { * controls how fields of the request message are mapped to the URL path. * Example: service Messaging { rpc GetMessage(GetMessageRequest) * returns (Message) { option (google.api.http) = { get: - * "/v1/{name=messages/*"}" }; } } message + * "/v1/{name=messages/*}" }; } } message * GetMessageRequest { string name = 1; // Mapped to URL path. } * message Message { string text = 1; // The resource content. } * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC diff --git a/src/apis/servicecontrol/README.md b/src/apis/servicecontrol/README.md index 50da02af6fc..68eca9c4dfc 100644 --- a/src/apis/servicecontrol/README.md +++ b/src/apis/servicecontrol/README.md @@ -2,7 +2,7 @@ # @google/servicecontrol -> Google Service Control provides control plane functionality to managed services, such as logging, monitoring, and status checks. +> Provides control plane functionality to managed services, such as logging, monitoring, and status checks. ## Installation diff --git a/src/apis/servicemanagement/v1.ts b/src/apis/servicemanagement/v1.ts index 444bb62c2ce..0b6b2e688a8 100644 --- a/src/apis/servicemanagement/v1.ts +++ b/src/apis/servicemanagement/v1.ts @@ -1042,7 +1042,7 @@ export namespace servicemanagement_v1 { * controls how fields of the request message are mapped to the URL path. * Example: service Messaging { rpc GetMessage(GetMessageRequest) * returns (Message) { option (google.api.http) = { get: - * "/v1/{name=messages/*"}" }; } } message + * "/v1/{name=messages/*}" }; } } message * GetMessageRequest { string name = 1; // Mapped to URL path. } * message Message { string text = 1; // The resource content. } * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC diff --git a/src/apis/servicenetworking/README.md b/src/apis/servicenetworking/README.md new file mode 100644 index 00000000000..ffd3b18e036 --- /dev/null +++ b/src/apis/servicenetworking/README.md @@ -0,0 +1,27 @@ +Google Inc. logo + +# @google/servicenetworking + +> Provides automatic management of network configurations necessary for certain services. + +## Installation + +```sh +$ npm install @google/servicenetworking +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client). + +## License +This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/servicenetworking/index.ts b/src/apis/servicenetworking/index.ts new file mode 100644 index 00000000000..e939a09a3c3 --- /dev/null +++ b/src/apis/servicenetworking/index.ts @@ -0,0 +1,32 @@ +// Copyright 2018, Google, LLC. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {getAPI, GoogleConfigurable} from 'googleapis-common'; +import {servicenetworking_v1beta} from './v1beta'; + +export const VERSIONS = { + 'v1beta': servicenetworking_v1beta.Servicenetworking, +}; + +export function servicenetworking(version: 'v1beta'): + servicenetworking_v1beta.Servicenetworking; +export function servicenetworking(options: servicenetworking_v1beta.Options): + servicenetworking_v1beta.Servicenetworking; +export function +servicenetworking( + this: GoogleConfigurable, + versionOrOptions: 'v1beta'|servicenetworking_v1beta.Options) { + return getAPI('servicenetworking', versionOrOptions, VERSIONS, this); +} diff --git a/src/apis/servicenetworking/package.json b/src/apis/servicenetworking/package.json new file mode 100644 index 00000000000..fbbc0082fe7 --- /dev/null +++ b/src/apis/servicenetworking/package.json @@ -0,0 +1,24 @@ +{ + "name": "@google/servicenetworking", + "version": "0.1.0", + "description": "servicenetworking", + "main": "index.js", + "types": "index.d.ts", + "keywords": ["google"], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/google/google-api-nodejs-client", + "bugs": { + "url" : "https://github.com/google/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url" : "https://github.com/google/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=6.0.0" + }, + "dependencies": { + "googleapis-common": "^0.2.0" + } +} diff --git a/src/apis/servicenetworking/v1beta.ts b/src/apis/servicenetworking/v1beta.ts new file mode 100644 index 00000000000..78504bcab30 --- /dev/null +++ b/src/apis/servicenetworking/v1beta.ts @@ -0,0 +1,2424 @@ +/** + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {AxiosPromise} from 'axios'; +import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library'; +import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace servicenetworking_v1beta { + export interface Options extends GlobalOptions { + version: 'v1beta'; + } + + /** + * Service Networking API + * + * Provides automatic management of network configurations necessary for + * certain services. + * + * @example + * const {google} = require('googleapis'); + * const servicenetworking = google.servicenetworking('v1beta'); + * + * @namespace servicenetworking + * @type {Function} + * @version v1beta + * @variation v1beta + * @param {object=} options Options for Servicenetworking + */ + export class Servicenetworking { + _options: GlobalOptions; + google?: GoogleConfigurable; + root = this; + + operations: Resource$Operations; + services: Resource$Services; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this._options = options || {}; + this.google = google; + this.getRoot.bind(this); + + this.operations = new Resource$Operations(this); + this.services = new Resource$Services(this); + } + + getRoot() { + return this.root; + } + } + + /** + * Request to create a subnetwork in a previously peered service network. + */ + export interface Schema$AddSubnetworkRequest { + /** + * Required. Resource representing service consumer. It may be different + * from the project number in consumer network parameter in case of that + * network being a shared VPC network. In that case, Service Networking will + * validate that this resource belongs to that shared VPC. For example + * 'projects/123456'. + */ + consumer?: string; + /** + * Required. Network name in the consumer project. This network must have + * been already peered with a shared VPC network using CreateConnection + * method. Must be in a form + * 'projects/{project}/global/networks/{network}'. {project} is a + * project number, as in '12345' {network} is network name. + */ + consumerNetwork?: string; + /** + * Optional. Description of the subnetwork. + */ + description?: string; + /** + * Required. The prefix length of the IP range. Use usual CIDR range + * notation. For example, '30' to provision subnet with x.x.x.x/30 + * CIDR range. Actual range will be determined using allocated range for the + * consumer peered network and returned in the result. + */ + ipPrefixLength?: number; + /** + * Required. Cloud [region](/compute/docs/reference/rest/v1/regions) for the + * new subnetwork. + */ + region?: string; + /** + * Required. Name for the new subnetwork. Must be a legal + * [subnetwork](compute/docs/reference/rest/v1/subnetworks) name. + */ + subnetwork?: string; + /** + * Optional. List of members that will be granted + * 'compute.networkUser' role on the newly added subnetwork. + */ + subnetworkUsers?: string[]; + } + /** + * Api is a light-weight descriptor for an API Interface. Interfaces are also + * described as "protocol buffer services" in some contexts, such as + * by the "service" keyword in a .proto file, but they are different + * from API Services, which represent a concrete implementation of an + * interface as opposed to simply a description of methods and bindings. They + * are also sometimes simply referred to as "APIs" in other + * contexts, such as the name of this message itself. See + * https://cloud.google.com/apis/design/glossary for detailed terminology. + */ + export interface Schema$Api { + /** + * The methods of this interface, in unspecified order. + */ + methods?: Schema$Method[]; + /** + * Included interfaces. See Mixin. + */ + mixins?: Schema$Mixin[]; + /** + * The fully qualified name of this interface, including package name + * followed by the interface's simple name. + */ + name?: string; + /** + * Any metadata attached to the interface. + */ + options?: Schema$Option[]; + /** + * Source context for the protocol buffer service represented by this + * message. + */ + sourceContext?: Schema$SourceContext; + /** + * The source syntax of the service. + */ + syntax?: string; + /** + * A version string for this interface. If specified, must have the form + * `major-version.minor-version`, as in `1.10`. If the minor version is + * omitted, it defaults to zero. If the entire version field is empty, the + * major version is derived from the package name, as outlined below. If the + * field is not empty, the version in the package name will be verified to + * be consistent with what is provided here. The versioning schema uses + * [semantic versioning](http://semver.org) where the major version number + * indicates a breaking change and the minor version an additive, + * non-breaking change. Both version numbers are signals to users what to + * expect from different versions, and should be carefully chosen based on + * the product plan. The major version is also reflected in the package + * name of the interface, which must end in `v<major-version>`, as in + * `google.feature.v1`. For major versions 0 and 1, the suffix can be + * omitted. Zero major versions must only be used for experimental, non-GA + * interfaces. + */ + version?: string; + } + /** + * `Authentication` defines the authentication configuration for an API. + * Example for an API targeted for external use: name: + * calendar.googleapis.com authentication: providers: - id: + * google_calendar_auth jwks_uri: + * https://www.googleapis.com/oauth2/v1/certs issuer: + * https://securetoken.google.com rules: - selector: "*" + * requirements: provider_id: google_calendar_auth + */ + export interface Schema$Authentication { + /** + * Defines a set of authentication providers that a service supports. + */ + providers?: Schema$AuthProvider[]; + /** + * A list of authentication rules that apply to individual API methods. + * **NOTE:** All service configuration rules follow "last one + * wins" order. + */ + rules?: Schema$AuthenticationRule[]; + } + /** + * Authentication rules for the service. By default, if a method has any + * authentication requirements, every request must include a valid credential + * matching one of the requirements. It's an error to include more than + * one kind of credential in a single request. If a method doesn't have + * any auth requirements, request credentials will be ignored. + */ + export interface Schema$AuthenticationRule { + /** + * If true, the service accepts API keys without any other credential. + */ + allowWithoutCredential?: boolean; + /** + * The requirements for OAuth credentials. + */ + oauth?: Schema$OAuthRequirements; + /** + * Requirements for additional authentication providers. + */ + requirements?: Schema$AuthRequirement[]; + /** + * Selects the methods to which this rule applies. Refer to selector for + * syntax details. + */ + selector?: string; + } + /** + * Configuration of authorization. This section determines the authorization + * provider, if unspecified, then no authorization check will be done. + * Example: experimental: authorization: provider: + * firebaserules.googleapis.com + */ + export interface Schema$AuthorizationConfig { + /** + * The name of the authorization provider, such as + * firebaserules.googleapis.com. + */ + provider?: string; + } + /** + * Configuration for an anthentication provider, including support for [JSON + * Web Token + * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). + */ + export interface Schema$AuthProvider { + /** + * The list of JWT + * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + * that are allowed to access. A JWT containing any of these audiences will + * be accepted. When this setting is absent, only JWTs with audience + * "https://Service_name/API_name" will be accepted. For example, + * if no audiences are in the setting, LibraryService API will only accept + * JWTs with the following audience + * "https://library-example.googleapis.com/google.example.library.v1.LibraryService". + * Example: audiences: bookstore_android.apps.googleusercontent.com, + * bookstore_web.apps.googleusercontent.com + */ + audiences?: string; + /** + * Redirect URL if JWT token is required but no present or is expired. + * Implement authorizationUrl of securityDefinitions in OpenAPI spec. + */ + authorizationUrl?: string; + /** + * The unique identifier of the auth provider. It will be referred to by + * `AuthRequirement.provider_id`. Example: "bookstore_auth". + */ + id?: string; + /** + * Identifies the principal that issued the JWT. See + * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + * Usually a URL or an email address. Example: + * https://securetoken.google.com Example: + * 1234567-compute@developer.gserviceaccount.com + */ + issuer?: string; + /** + * URL of the provider's public key set to validate signature of the + * JWT. See [OpenID + * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + * Optional if the key set document: - can be retrieved from [OpenID + * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of + * the issuer. - can be inferred from the email domain of the issuer (e.g. + * a Google service account). Example: + * https://www.googleapis.com/oauth2/v1/certs + */ + jwksUri?: string; + } + /** + * User-defined authentication requirements, including support for [JSON Web + * Token + * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). + */ + export interface Schema$AuthRequirement { + /** + * NOTE: This will be deprecated soon, once AuthProvider.audiences is + * implemented and accepted in all the runtime components. The list of JWT + * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + * that are allowed to access. A JWT containing any of these audiences will + * be accepted. When this setting is absent, only JWTs with audience + * "https://Service_name/API_name" will be accepted. For example, + * if no audiences are in the setting, LibraryService API will only accept + * JWTs with the following audience + * "https://library-example.googleapis.com/google.example.library.v1.LibraryService". + * Example: audiences: bookstore_android.apps.googleusercontent.com, + * bookstore_web.apps.googleusercontent.com + */ + audiences?: string; + /** + * id from authentication provider. Example: provider_id: + * bookstore_auth + */ + providerId?: string; + } + /** + * `Backend` defines the backend configuration for a service. + */ + export interface Schema$Backend { + /** + * A list of API backend rules that apply to individual API methods. + * **NOTE:** All service configuration rules follow "last one + * wins" order. + */ + rules?: Schema$BackendRule[]; + } + /** + * A backend rule provides configuration for an individual API element. + */ + export interface Schema$BackendRule { + /** + * The address of the API backend. + */ + address?: string; + /** + * The number of seconds to wait for a response from a request. The default + * deadline for gRPC is infinite (no deadline) and HTTP requests is 5 + * seconds. + */ + deadline?: number; + /** + * Minimum deadline in seconds needed for this method. Calls having deadline + * value lower than this will be rejected. + */ + minDeadline?: number; + /** + * Selects the methods to which this rule applies. Refer to selector for + * syntax details. + */ + selector?: string; + } + /** + * Billing related configuration of the service. The following example shows + * how to configure monitored resources and metrics for billing: + * monitored_resources: - type: library.googleapis.com/branch labels: - + * key: /city description: The city where the library branch is + * located in. - key: /name description: The name of the branch. + * metrics: - name: library.googleapis.com/book/borrowed_count + * metric_kind: DELTA value_type: INT64 billing: + * consumer_destinations: - monitored_resource: + * library.googleapis.com/branch metrics: - + * library.googleapis.com/book/borrowed_count + */ + export interface Schema$Billing { + /** + * Billing configurations for sending metrics to the consumer project. There + * can be multiple consumer destinations per service, each one must have a + * different monitored resource type. A metric can be used in at most one + * consumer destination. + */ + consumerDestinations?: Schema$BillingDestination[]; + } + /** + * Configuration of a specific billing destination (Currently only support + * bill against consumer project). + */ + export interface Schema$BillingDestination { + /** + * Names of the metrics to report to this billing destination. Each name + * must be defined in Service.metrics section. + */ + metrics?: string[]; + /** + * The monitored resource type. The type must be defined in + * Service.monitored_resources section. + */ + monitoredResource?: string; + } + /** + * Message returning the created service connection. + */ + export interface Schema$Connection { + /** + * Name of VPC network connected with service producer network. Must be in a + * form 'projects/{project}/global/networks/{network}'. {project} is + * a project number, as in '12345' {network} is a network name. + */ + network?: string; + /** + * Output only. Name of the peering connection that is created by the + * peering service. + */ + peering?: string; + /** + * Named IP address range(s) of PEERING type allocated for this service + * provider. Note that invoking this method with a different range when + * connection is already established will not modify already provisioned + * service producer subnetworks. + */ + reservedPeeringRanges?: string[]; + } + /** + * `Context` defines which contexts an API requests. Example: context: + * rules: - selector: "*" requested: - + * google.rpc.context.ProjectContext - + * google.rpc.context.OriginContext The above specifies that all methods in + * the API request `google.rpc.context.ProjectContext` and + * `google.rpc.context.OriginContext`. Available context types are defined in + * package `google.rpc.context`. This also provides mechanism to whitelist + * any protobuf message extension that can be sent in grpc metadata using + * “x-goog-ext-<extension_id>-bin” and + * “x-goog-ext-<extension_id>-jspb” format. For example, list any + * service specific protobuf types that can appear in grpc metadata as follows + * in your yaml file: Example: context: rules: - selector: + * "google.example.library.v1.LibraryService.CreateBook" + * allowed_request_extensions: - google.foo.v1.NewExtension + * allowed_response_extensions: - google.foo.v1.NewExtension You can + * also specify extension ID instead of fully qualified extension name here. + */ + export interface Schema$Context { + /** + * A list of RPC context rules that apply to individual API methods. + * **NOTE:** All service configuration rules follow "last one + * wins" order. + */ + rules?: Schema$ContextRule[]; + } + /** + * A context rule provides information about the context for an individual API + * element. + */ + export interface Schema$ContextRule { + /** + * A list of full type names or extension IDs of extensions allowed in grpc + * side channel from client to backend. + */ + allowedRequestExtensions?: string[]; + /** + * A list of full type names or extension IDs of extensions allowed in grpc + * side channel from backend to client. + */ + allowedResponseExtensions?: string[]; + /** + * A list of full type names of provided contexts. + */ + provided?: string[]; + /** + * A list of full type names of requested contexts. + */ + requested?: string[]; + /** + * Selects the methods to which this rule applies. Refer to selector for + * syntax details. + */ + selector?: string; + } + /** + * Selects and configures the service controller used by the service. The + * service controller handles features like abuse, quota, billing, logging, + * monitoring, etc. + */ + export interface Schema$Control { + /** + * The service control environment to use. If empty, no control plane + * feature (like quota and billing) will be enabled. + */ + environment?: string; + } + /** + * Customize service error responses. For example, list any service specific + * protobuf types that can appear in error detail lists of error responses. + * Example: custom_error: types: - google.foo.v1.CustomError + * - google.foo.v1.AnotherError + */ + export interface Schema$CustomError { + /** + * The list of custom error rules that apply to individual API messages. + * **NOTE:** All service configuration rules follow "last one + * wins" order. + */ + rules?: Schema$CustomErrorRule[]; + /** + * The list of custom error detail types, e.g. + * 'google.foo.v1.CustomError'. + */ + types?: string[]; + } + /** + * A custom error rule. + */ + export interface Schema$CustomErrorRule { + /** + * Mark this message as possible payload in error response. Otherwise, + * objects of this type will be filtered when they appear in error payload. + */ + isErrorType?: boolean; + /** + * Selects messages to which this rule applies. Refer to selector for + * syntax details. + */ + selector?: string; + } + /** + * A custom pattern is used for defining custom HTTP verb. + */ + export interface Schema$CustomHttpPattern { + /** + * The name of this custom HTTP verb. + */ + kind?: string; + /** + * The path matched by this custom verb. + */ + path?: string; + } + /** + * `Documentation` provides the information for describing a service. Example: + * <pre><code>documentation: summary: > The Google + * Calendar API gives access to most calendar features. pages: - name: + * Overview content: &#40;== include google/foo/overview.md + * ==&#41; - name: Tutorial content: &#40;== include + * google/foo/tutorial.md ==&#41; subpages; - name: Java content: + * &#40;== include google/foo/tutorial_java.md ==&#41; rules: - + * selector: google.calendar.Calendar.Get description: > ... - + * selector: google.calendar.Calendar.Put description: > ... + * </code></pre> Documentation is provided in markdown syntax. In + * addition to standard markdown features, definition lists, tables and fenced + * code blocks are supported. Section headers can be provided and are + * interpreted relative to the section nesting of the context where a + * documentation fragment is embedded. Documentation from the IDL is merged + * with documentation defined via the config at normalization time, where + * documentation provided by config rules overrides IDL provided. A number of + * constructs specific to the API platform are supported in documentation + * text. In order to reference a proto element, the following notation can be + * used: + * <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre> + * To override the display text used for the link, this can be used: + * <pre><code>&#91;display + * text]&#91;fully.qualified.proto.name]</code></pre> Text can + * be excluded from doc using the following notation: + * <pre><code>&#40;-- internal comment + * --&#41;</code></pre> A few directives are available in + * documentation. Note that directives must appear on a single line to be + * properly identified. The `include` directive includes a markdown file from + * an external source: <pre><code>&#40;== include path/to/file + * ==&#41;</code></pre> The `resource_for` directive marks a + * message to be the resource of a collection in REST view. If it is not + * specified, tools attempt to infer the resource from the operations in a + * collection: <pre><code>&#40;== resource_for + * v1.shelves.books ==&#41;</code></pre> The directive + * `suppress_warning` does not directly affect documentation and is documented + * together with service config validation. + */ + export interface Schema$Documentation { + /** + * The URL to the root of documentation. + */ + documentationRootUrl?: string; + /** + * Declares a single overview page. For example: + * <pre><code>documentation: summary: ... overview: + * &#40;== include overview.md ==&#41; </code></pre> + * This is a shortcut for the following declaration (using pages style): + * <pre><code>documentation: summary: ... pages: - name: + * Overview content: &#40;== include overview.md ==&#41; + * </code></pre> Note: you cannot specify both `overview` field + * and `pages` field. + */ + overview?: string; + /** + * The top level pages for the documentation set. + */ + pages?: Schema$Page[]; + /** + * A list of documentation rules that apply to individual API elements. + * **NOTE:** All service configuration rules follow "last one + * wins" order. + */ + rules?: Schema$DocumentationRule[]; + /** + * A short summary of what the service does. Can only be provided by plain + * text. + */ + summary?: string; + } + /** + * A documentation rule provides information about individual API elements. + */ + export interface Schema$DocumentationRule { + /** + * Deprecation description of the selected element(s). It can be provided if + * an element is marked as `deprecated`. + */ + deprecationDescription?: string; + /** + * Description of the selected API(s). + */ + description?: string; + /** + * The selector is a comma-separated list of patterns. Each pattern is a + * qualified name of the element which may end in "*", indicating + * a wildcard. Wildcards are only allowed at the end and for a whole + * component of the qualified name, i.e. "foo.*" is ok, but not + * "foo.b*" or "foo.*.bar". To specify a default for all + * applicable elements, the whole pattern "*" is used. + */ + selector?: string; + } + /** + * `Endpoint` describes a network endpoint that serves a set of APIs. A + * service may expose any number of endpoints, and all endpoints share the + * same service configuration, such as quota configuration and monitoring + * configuration. Example service configuration: name: + * library-example.googleapis.com endpoints: # Below entry makes + * 'google.example.library.v1.Library' # API be served from + * endpoint address library-example.googleapis.com. # It also allows + * HTTP OPTIONS calls to be passed to the backend, for # it to decide + * whether the subsequent cross-origin request is # allowed to proceed. + * - name: library-example.googleapis.com allow_cors: true + */ + export interface Schema$Endpoint { + /** + * DEPRECATED: This field is no longer supported. Instead of using aliases, + * please specify multiple google.api.Endpoint for each of the intended + * aliases. Additional names that this endpoint will be hosted on. + */ + aliases?: string[]; + /** + * Allowing + * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka + * cross-domain traffic, would allow the backends served from this endpoint + * to receive and respond to HTTP OPTIONS requests. The response will be + * used by the browser to determine whether the subsequent cross-origin + * request is allowed to proceed. + */ + allowCors?: boolean; + /** + * The list of features enabled on this endpoint. + */ + features?: string[]; + /** + * The canonical name of this endpoint. + */ + name?: string; + /** + * The specification of an Internet routable address of API frontend that + * will handle requests to this [API + * Endpoint](https://cloud.google.com/apis/design/glossary). It should be + * either a valid IPv4 address or a fully-qualified domain name. For + * example, "8.8.8.8" or "myservice.appspot.com". + */ + target?: string; + } + /** + * Enum type definition. + */ + export interface Schema$Enum { + /** + * Enum value definitions. + */ + enumvalue?: Schema$EnumValue[]; + /** + * Enum type name. + */ + name?: string; + /** + * Protocol buffer options. + */ + options?: Schema$Option[]; + /** + * The source context. + */ + sourceContext?: Schema$SourceContext; + /** + * The source syntax. + */ + syntax?: string; + } + /** + * Enum value definition. + */ + export interface Schema$EnumValue { + /** + * Enum value name. + */ + name?: string; + /** + * Enum value number. + */ + number?: number; + /** + * Protocol buffer options. + */ + options?: Schema$Option[]; + } + /** + * Experimental service configuration. These configuration options can only be + * used by whitelisted users. + */ + export interface Schema$Experimental { + /** + * Authorization configuration. + */ + authorization?: Schema$AuthorizationConfig; + } + /** + * A single field of a message type. + */ + export interface Schema$Field { + /** + * The field cardinality. + */ + cardinality?: string; + /** + * The string value of the default value of this field. Proto2 syntax only. + */ + defaultValue?: string; + /** + * The field JSON name. + */ + jsonName?: string; + /** + * The field type. + */ + kind?: string; + /** + * The field name. + */ + name?: string; + /** + * The field number. + */ + number?: number; + /** + * The index of the field type in `Type.oneofs`, for message or enumeration + * types. The first type has index 1; zero means the type is not in the + * list. + */ + oneofIndex?: number; + /** + * The protocol buffer options. + */ + options?: Schema$Option[]; + /** + * Whether to use alternative packed wire representation. + */ + packed?: boolean; + /** + * The field type URL, without the scheme, for message or enumeration types. + * Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + */ + typeUrl?: string; + } + /** + * Defines the HTTP configuration for an API service. It contains a list of + * HttpRule, each specifying the mapping of an RPC method to one or more HTTP + * REST API methods. + */ + export interface Schema$Http { + /** + * When set to true, URL path parmeters will be fully URI-decoded except in + * cases of single segment matches in reserved expansion, where + * "%2F" will be left encoded. The default behavior is to not + * decode RFC 6570 reserved characters in multi segment matches. + */ + fullyDecodeReservedExpansion?: boolean; + /** + * A list of HTTP configuration rules that apply to individual API methods. + * **NOTE:** All service configuration rules follow "last one + * wins" order. + */ + rules?: Schema$HttpRule[]; + } + /** + * # gRPC Transcoding gRPC Transcoding is a feature for mapping between a + * gRPC method and one or more HTTP REST endpoints. It allows developers to + * build a single API service that supports both gRPC APIs and REST APIs. Many + * systems, including [Google APIs](https://github.com/googleapis/googleapis), + * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC + * Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and + * [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and + * use it for large scale production services. `HttpRule` defines the schema + * of the gRPC/REST mapping. The mapping specifies how different portions of + * the gRPC request message are mapped to the URL path, URL query parameters, + * and HTTP request body. It also controls how the gRPC response message is + * mapped to the HTTP response body. `HttpRule` is typically specified as an + * `google.api.http` annotation on the gRPC method. Each mapping specifies a + * URL path template and an HTTP method. The path template may refer to one or + * more fields in the gRPC request message, as long as each field is a + * non-repeated field with a primitive (non-message) type. The path template + * controls how fields of the request message are mapped to the URL path. + * Example: service Messaging { rpc GetMessage(GetMessageRequest) + * returns (Message) { option (google.api.http) = { get: + * "/v1/{name=messages/*}" }; } } message + * GetMessageRequest { string name = 1; // Mapped to URL path. } + * message Message { string text = 1; // The resource content. } + * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC + * -----|----- `GET /v1/messages/123456` | `GetMessage(name: + * "messages/123456")` Any fields in the request message which are + * not bound by the path template automatically become HTTP query parameters + * if there is no HTTP request body. For example: service Messaging { rpc + * GetMessage(GetMessageRequest) returns (Message) { option + * (google.api.http) = { get:"/v1/messages/{message_id}" + * }; } } message GetMessageRequest { message SubMessage { + * string subfield = 1; } string message_id = 1; // Mapped to URL + * path. int64 revision = 2; // Mapped to URL query parameter + * `revision`. SubMessage sub = 3; // Mapped to URL query parameter + * `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: + * HTTP | gRPC -----|----- `GET + * /v1/messages/123456?revision=2&sub.subfield=foo` | + * `GetMessage(message_id: "123456" revision: 2 sub: + * SubMessage(subfield: "foo"))` Note that fields which are mapped + * to URL query parameters must have a primitive type or a repeated primitive + * type or a non-repeated message type. In the case of a repeated type, the + * parameter can be repeated in the URL as `...?param=A&param=B`. In the + * case of a message type, each field of the message is mapped to a separate + * parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods + * that allow a request body, the `body` field specifies the mapping. Consider + * a REST update method on the message resource collection: service + * Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) + * { option (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "message" + * }; } } message UpdateMessageRequest { string message_id + * = 1; // mapped to the URL Message message = 2; // mapped to the + * body } The following HTTP JSON to RPC mapping is enabled, where the + * representation of the JSON in the request body is determined by protos JSON + * encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { + * "text": "Hi!" }` | `UpdateMessage(message_id: + * "123456" message { text: "Hi!" })` The special name + * `*` can be used in the body mapping to define that every field not bound by + * the path template should be mapped to the request body. This enables the + * following alternative definition of the update method: service + * Messaging { rpc UpdateMessage(Message) returns (Message) { option + * (google.api.http) = { patch: + * "/v1/messages/{message_id}" body: "*" }; } } + * message Message { string message_id = 1; string text = 2; } + * The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- + * `PATCH /v1/messages/123456 { "text": "Hi!" }` | + * `UpdateMessage(message_id: "123456" text: "Hi!")` Note + * that when using `*` in the body mapping, it is not possible to have HTTP + * parameters, as all fields not bound by the path end in the body. This makes + * this option more rarely used in practice when defining REST APIs. The + * common usage of `*` is in custom methods which don't use the URL at all + * for transferring data. It is possible to define multiple HTTP methods for + * one RPC by using the `additional_bindings` option. Example: service + * Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { + * option (google.api.http) = { get: + * "/v1/messages/{message_id}" additional_bindings { get: + * "/v1/users/{user_id}/messages/{message_id}" } }; } } + * message GetMessageRequest { string message_id = 1; string + * user_id = 2; } This enables the following two alternative HTTP JSON to + * RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | + * `GetMessage(message_id: "123456")` `GET + * /v1/users/me/messages/123456` | `GetMessage(user_id: "me" + * message_id: "123456")` ## Rules for HTTP mapping 1. Leaf + * request fields (recursive expansion nested messages in the request message) + * are classified into three categories: - Fields referred by the path + * template. They are passed via the URL path. - Fields referred by the + * HttpRule.body. They are passed via the HTTP request body. - All + * other fields are passed via the URL query parameters, and the parameter + * name is the field path in the request message. A repeated field can be + * represented as multiple query parameters under the same name. 2. If + * HttpRule.body is "*", there is no URL query parameter, all fields + * are passed via URL path and HTTP request body. 3. If HttpRule.body is + * omitted, there is no HTTP request body, all fields are passed via URL + * path and URL query parameters. ### Path template syntax Template = + * "/" Segments [ Verb ] ; Segments = Segment { "/" + * Segment } ; Segment = "*" | "**" | LITERAL | + * Variable ; Variable = "{" FieldPath [ "=" Segments + * ] "}" ; FieldPath = IDENT { "." IDENT } ; Verb + * = ":" LITERAL ; The syntax `*` matches a single URL path + * segment. The syntax `**` matches zero or more URL path segments, which must + * be the last part of the URL path except the `Verb`. The syntax `Variable` + * matches part of the URL path as specified by its template. A variable + * template must not contain other variables. If a variable matches a single + * path segment, its template may be omitted, e.g. `{var}` is equivalent to + * `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If + * the `LITERAL` contains any reserved character, such characters should be + * percent-encoded before the matching. If a variable contains exactly one + * path segment, such as `"{var}"` or `"{var=*}"`, when + * such a variable is expanded into a URL path on the client side, all + * characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side + * does the reverse decoding. Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{var}`. If a variable contains multiple path segments, such as + * `"{var=foo/*}"` or `"{var=**}"`, when such a variable + * is expanded into a URL path on the client side, all characters except + * `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse + * decoding, except "%2F" and "%2f" are left unchanged. + * Such variables show up in the [Discovery + * Document](https://developers.google.com/discovery/v1/reference/apis) as + * `{+var}`. ## Using gRPC API Service Configuration gRPC API Service + * Configuration (service config) is a configuration language for configuring + * a gRPC service to become a user-facing product. The service config is + * simply the YAML representation of the `google.api.Service` proto message. + * As an alternative to annotating your proto file, you can configure gRPC + * transcoding in your service config YAML files. You do this by specifying a + * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same + * effect as the proto annotation. This can be particularly useful if you have + * a proto that is reused in multiple services. Note that any transcoding + * specified in the service config will override any matching transcoding + * configuration in the proto. Example: http: rules: # + * Selects a gRPC method and applies HttpRule to it. - selector: + * example.v1.Messaging.GetMessage get: + * /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC + * Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON + * conversion must follow the [proto3 + * specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + * While the single segment variable follows the semantics of [RFC + * 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String + * Expansion, the multi segment variable **does not** follow RFC 6570 + * Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion + * does not expand special characters like `?` and `#`, which would lead to + * invalid URLs. As the result, gRPC Transcoding uses a custom encoding for + * multi segment variables. The path variables **must not** refer to any + * repeated or mapped field, because client libraries are not capable of + * handling such variable expansion. The path variables **must not** capture + * the leading "/" character. The reason is that the most common use + * case "{var}" does not capture the leading "/" + * character. For consistency, all path variables must share the same + * behavior. Repeated message fields must not be mapped to URL query + * parameters, because no client library can support such complicated mapping. + * If an API needs to use a JSON array for request or response body, it can + * map the request or response body to a repeated field. However, some gRPC + * Transcoding implementations may not support this feature. + */ + export interface Schema$HttpRule { + /** + * Additional HTTP bindings for the selector. Nested bindings must not + * contain an `additional_bindings` field themselves (that is, the nesting + * may only be one level deep). + */ + additionalBindings?: Schema$HttpRule[]; + /** + * The name of the request field whose value is mapped to the HTTP request + * body, or `*` for mapping all request fields not captured by the path + * pattern to the HTTP body, or omitted for not having any HTTP request + * body. NOTE: the referred field must be present at the top-level of the + * request message type. + */ + body?: string; + /** + * The custom pattern is used for specifying an HTTP method that is not + * included in the `pattern` field, such as HEAD, or "*" to leave + * the HTTP method unspecified for this rule. The wild-card rule is useful + * for services that provide content to Web (HTML) clients. + */ + custom?: Schema$CustomHttpPattern; + /** + * Maps to HTTP DELETE. Used for deleting a resource. + */ + delete?: string; + /** + * Maps to HTTP GET. Used for listing and getting information about + * resources. + */ + get?: string; + /** + * Maps to HTTP PATCH. Used for updating a resource. + */ + patch?: string; + /** + * Maps to HTTP POST. Used for creating a resource or performing an action. + */ + post?: string; + /** + * Maps to HTTP PUT. Used for replacing a resource. + */ + put?: string; + /** + * Optional. The name of the response field whose value is mapped to the + * HTTP response body. When omitted, the entire response message will be + * used as the HTTP response body. NOTE: The referred field must be present + * at the top-level of the response message type. + */ + responseBody?: string; + /** + * Selects a method to which this rule applies. Refer to selector for + * syntax details. + */ + selector?: string; + } + /** + * A description of a label. + */ + export interface Schema$LabelDescriptor { + /** + * A human-readable description for the label. + */ + description?: string; + /** + * The label key. + */ + key?: string; + /** + * The type of data that can be assigned to the label. + */ + valueType?: string; + } + /** + * ListConnectionsResponse is the response to list peering states for the + * given service and consumer project. + */ + export interface Schema$ListConnectionsResponse { + /** + * The list of Connections. + */ + connections?: Schema$Connection[]; + } + /** + * A description of a log type. Example in YAML format: - name: + * library.googleapis.com/activity_history description: The history of + * borrowing and returning library items. display_name: Activity labels: + * - key: /customer_id description: Identifier of a library customer + */ + export interface Schema$LogDescriptor { + /** + * A human-readable description of this log. This information appears in the + * documentation and can contain details. + */ + description?: string; + /** + * The human-readable name for this log. This information appears on the + * user interface and should be concise. + */ + displayName?: string; + /** + * The set of labels that are available to describe a specific log entry. + * Runtime requests that contain labels not specified here are considered + * invalid. + */ + labels?: Schema$LabelDescriptor[]; + /** + * The name of the log. It must be less than 512 characters long and can + * include the following characters: upper- and lower-case alphanumeric + * characters [A-Za-z0-9], and punctuation characters including slash, + * underscore, hyphen, period [/_-.]. + */ + name?: string; + } + /** + * Logging configuration of the service. The following example shows how to + * configure logs to be sent to the producer and consumer projects. In the + * example, the `activity_history` log is sent to both the producer and + * consumer projects, whereas the `purchase_history` log is only sent to the + * producer project. monitored_resources: - type: + * library.googleapis.com/branch labels: - key: /city description: + * The city where the library branch is located in. - key: /name + * description: The name of the branch. logs: - name: activity_history + * labels: - key: /customer_id - name: purchase_history logging: + * producer_destinations: - monitored_resource: + * library.googleapis.com/branch logs: - activity_history - + * purchase_history consumer_destinations: - monitored_resource: + * library.googleapis.com/branch logs: - activity_history + */ + export interface Schema$Logging { + /** + * Logging configurations for sending logs to the consumer project. There + * can be multiple consumer destinations, each one must have a different + * monitored resource type. A log can be used in at most one consumer + * destination. + */ + consumerDestinations?: Schema$LoggingDestination[]; + /** + * Logging configurations for sending logs to the producer project. There + * can be multiple producer destinations, each one must have a different + * monitored resource type. A log can be used in at most one producer + * destination. + */ + producerDestinations?: Schema$LoggingDestination[]; + } + /** + * Configuration of a specific logging destination (the producer project or + * the consumer project). + */ + export interface Schema$LoggingDestination { + /** + * Names of the logs to be sent to this destination. Each name must be + * defined in the Service.logs section. If the log name is not a domain + * scoped name, it will be automatically prefixed with the service name + * followed by "/". + */ + logs?: string[]; + /** + * The monitored resource type. The type must be defined in the + * Service.monitored_resources section. + */ + monitoredResource?: string; + } + /** + * Method represents a method of an API interface. + */ + export interface Schema$Method { + /** + * The simple name of this method. + */ + name?: string; + /** + * Any metadata attached to the method. + */ + options?: Schema$Option[]; + /** + * If true, the request is streamed. + */ + requestStreaming?: boolean; + /** + * A URL of the input message type. + */ + requestTypeUrl?: string; + /** + * If true, the response is streamed. + */ + responseStreaming?: boolean; + /** + * The URL of the output message type. + */ + responseTypeUrl?: string; + /** + * The source syntax of this method. + */ + syntax?: string; + } + /** + * Defines a metric type and its schema. Once a metric descriptor is created, + * deleting or altering it stops data collection and makes the metric + * type's existing data unusable. + */ + export interface Schema$MetricDescriptor { + /** + * A detailed description of the metric, which can be used in documentation. + */ + description?: string; + /** + * A concise name for the metric, which can be displayed in user interfaces. + * Use sentence case without an ending period, for example "Request + * count". This field is optional but it is recommended to be set for + * any metrics associated with user-visible concepts, such as Quota. + */ + displayName?: string; + /** + * The set of labels that can be used to describe a specific instance of + * this metric type. For example, the + * `appengine.googleapis.com/http/server/response_latencies` metric type has + * a label for the HTTP response code, `response_code`, so you can look at + * latencies for successful responses or just for responses that failed. + */ + labels?: Schema$LabelDescriptor[]; + /** + * Optional. Metadata which can be used to guide usage of the metric. + */ + metadata?: Schema$MetricDescriptorMetadata; + /** + * Whether the metric records instantaneous values, changes to a value, etc. + * Some combinations of `metric_kind` and `value_type` might not be + * supported. + */ + metricKind?: string; + /** + * The resource name of the metric descriptor. + */ + name?: string; + /** + * The metric type, including its DNS name prefix. The type is not + * URL-encoded. All user-defined metric types have the DNS name + * `custom.googleapis.com` or `external.googleapis.com`. Metric types + * should use a natural hierarchical grouping. For example: + * "custom.googleapis.com/invoice/paid/amount" + * "external.googleapis.com/prometheus/up" + * "appengine.googleapis.com/http/server/response_latencies" + */ + type?: string; + /** + * The unit in which the metric value is reported. It is only applicable if + * the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported + * units are a subset of [The Unified Code for Units of + * Measure](http://unitsofmeasure.org/ucum.html) standard: **Basic units + * (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute + * * `h` hour * `d` day **Prefixes (PREFIX)** * `k` kilo + * (10**3) * `M` mega (10**6) * `G` giga (10**9) * `T` tera + * (10**12) * `P` peta (10**15) * `E` exa (10**18) * `Z` + * zetta (10**21) * `Y` yotta (10**24) * `m` milli (10**-3) * + * `u` micro (10**-6) * `n` nano (10**-9) * `p` pico + * (10**-12) * `f` femto (10**-15) * `a` atto (10**-18) * `z` + * zepto (10**-21) * `y` yocto (10**-24) * `Ki` kibi (2**10) * + * `Mi` mebi (2**20) * `Gi` gibi (2**30) * `Ti` tebi (2**40) + * **Grammar** The grammar also includes these connectors: * `/` division + * (as an infix operator, e.g. `1/s`). * `.` multiplication (as an infix + * operator, e.g. `GBy.d`) The grammar for a unit is as follows: Expression + * = Component { "." Component } { "/" Component } ; + * Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] | + * Annotation | "1" ; Annotation + * = "{" NAME "}" ; Notes: * `Annotation` is just a + * comment if it follows a `UNIT` and is equivalent to `1` if it is used + * alone. For examples, `{requests}/s == 1/s`, `By{transmitted}/s == + * By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not + * containing '{' or '}'. * `1` represents dimensionless + * value 1, such as in `1/s`. * `%` represents dimensionless value 1/100, + * and annotates values giving a percentage. + */ + unit?: string; + /** + * Whether the measurement is an integer, a floating-point number, etc. Some + * combinations of `metric_kind` and `value_type` might not be supported. + */ + valueType?: string; + } + /** + * Additional annotations that can be used to guide the usage of a metric. + */ + export interface Schema$MetricDescriptorMetadata { + /** + * The delay of data points caused by ingestion. Data points older than this + * age are guaranteed to be ingested and available to be read, excluding + * data loss due to errors. + */ + ingestDelay?: string; + /** + * The launch stage of the metric definition. + */ + launchStage?: string; + /** + * The sampling period of metric data points. For metrics which are written + * periodically, consecutive data points are stored at this time interval, + * excluding data loss due to errors. Metrics with a higher granularity have + * a smaller sampling period. + */ + samplePeriod?: string; + } + /** + * Bind API methods to metrics. Binding a method to a metric causes that + * metric's configured quota behaviors to apply to the method call. + */ + export interface Schema$MetricRule { + /** + * Metrics to update when the selected methods are called, and the + * associated cost applied to each metric. The key of the map is the metric + * name, and the values are the amount increased for the metric against + * which the quota limits are defined. The value must not be negative. + */ + metricCosts?: any; + /** + * Selects the methods to which this rule applies. Refer to selector for + * syntax details. + */ + selector?: string; + } + /** + * Declares an API Interface to be included in this interface. The including + * interface must redeclare all the methods from the included interface, but + * documentation and options are inherited as follows: - If after comment and + * whitespace stripping, the documentation string of the redeclared method + * is empty, it will be inherited from the original method. - Each + * annotation belonging to the service config (http, visibility) which is + * not set in the redeclared method will be inherited. - If an http + * annotation is inherited, the path pattern will be modified as follows. + * Any version prefix will be replaced by the version of the including + * interface plus the root path if specified. Example of a simple mixin: + * package google.acl.v1; service AccessControl { // Get the + * underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { + * option (google.api.http).get = "/v1/{resource=**}:getAcl"; } } + * package google.storage.v2; service Storage { // rpc + * GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc + * GetData(GetDataRequest) returns (Data) { option + * (google.api.http).get = "/v2/{resource=**}"; } } + * Example of a mixin configuration: apis: - name: + * google.storage.v2.Storage mixins: - name: + * google.acl.v1.AccessControl The mixin construct implies that all methods + * in `AccessControl` are also declared with same name and request/response + * types in `Storage`. A documentation generator or annotation processor will + * see the effective `Storage.GetAcl` method after inherting documentation and + * annotations as follows: service Storage { // Get the underlying + * ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option + * (google.api.http).get = "/v2/{resource=**}:getAcl"; } ... + * } Note how the version in the path pattern changed from `v1` to `v2`. If + * the `root` field in the mixin is specified, it should be a relative path + * under which inherited HTTP paths are placed. Example: apis: - + * name: google.storage.v2.Storage mixins: - name: + * google.acl.v1.AccessControl root: acls This implies the following + * inherited HTTP annotation: service Storage { // Get the + * underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { + * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; + * } ... } + */ + export interface Schema$Mixin { + /** + * The fully qualified name of the interface which is included. + */ + name?: string; + /** + * If non-empty specifies a path under which inherited HTTP paths are + * rooted. + */ + root?: string; + } + /** + * An object that describes the schema of a MonitoredResource object using a + * type name and a set of labels. For example, the monitored resource + * descriptor for Google Compute Engine VM instances has a type of + * `"gce_instance"` and specifies the use of the labels + * `"instance_id"` and `"zone"` to identify particular VM + * instances. Different APIs can support different monitored resource types. + * APIs generally provide a `list` method that returns the monitored resource + * descriptors used by the API. + */ + export interface Schema$MonitoredResourceDescriptor { + /** + * Optional. A detailed description of the monitored resource type that + * might be used in documentation. + */ + description?: string; + /** + * Optional. A concise name for the monitored resource type that might be + * displayed in user interfaces. It should be a Title Cased Noun Phrase, + * without any article or other determiners. For example, `"Google + * Cloud SQL Database"`. + */ + displayName?: string; + /** + * Required. A set of labels used to describe instances of this monitored + * resource type. For example, an individual Google Cloud SQL database is + * identified by values for the labels `"database_id"` and + * `"zone"`. + */ + labels?: Schema$LabelDescriptor[]; + /** + * Optional. The resource name of the monitored resource descriptor: + * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` + * where {type} is the value of the `type` field in this object and + * {project_id} is a project ID that provides API-specific context for + * accessing the type. APIs that do not use project information can use the + * resource name format `"monitoredResourceDescriptors/{type}"`. + */ + name?: string; + /** + * Required. The monitored resource type. For example, the type + * `"cloudsql_database"` represents databases in Google Cloud SQL. + * The maximum length of this value is 256 characters. + */ + type?: string; + } + /** + * Monitoring configuration of the service. The example below shows how to + * configure monitored resources and metrics for monitoring. In the example, a + * monitored resource and two metrics are defined. The + * `library.googleapis.com/book/returned_count` metric is sent to both + * producer and consumer projects, whereas the + * `library.googleapis.com/book/overdue_count` metric is only sent to the + * consumer project. monitored_resources: - type: + * library.googleapis.com/branch labels: - key: /city description: + * The city where the library branch is located in. - key: /name + * description: The name of the branch. metrics: - name: + * library.googleapis.com/book/returned_count metric_kind: DELTA + * value_type: INT64 labels: - key: /customer_id - name: + * library.googleapis.com/book/overdue_count metric_kind: GAUGE + * value_type: INT64 labels: - key: /customer_id monitoring: + * producer_destinations: - monitored_resource: + * library.googleapis.com/branch metrics: - + * library.googleapis.com/book/returned_count consumer_destinations: - + * monitored_resource: library.googleapis.com/branch metrics: - + * library.googleapis.com/book/returned_count - + * library.googleapis.com/book/overdue_count + */ + export interface Schema$Monitoring { + /** + * Monitoring configurations for sending metrics to the consumer project. + * There can be multiple consumer destinations, each one must have a + * different monitored resource type. A metric can be used in at most one + * consumer destination. + */ + consumerDestinations?: Schema$MonitoringDestination[]; + /** + * Monitoring configurations for sending metrics to the producer project. + * There can be multiple producer destinations, each one must have a + * different monitored resource type. A metric can be used in at most one + * producer destination. + */ + producerDestinations?: Schema$MonitoringDestination[]; + } + /** + * Configuration of a specific monitoring destination (the producer project or + * the consumer project). + */ + export interface Schema$MonitoringDestination { + /** + * Names of the metrics to report to this monitoring destination. Each name + * must be defined in Service.metrics section. + */ + metrics?: string[]; + /** + * The monitored resource type. The type must be defined in + * Service.monitored_resources section. + */ + monitoredResource?: string; + } + /** + * OAuth scopes are a way to define data and permissions on data. For example, + * there are scopes defined for "Read-only access to Google + * Calendar" and "Access to Cloud Platform". Users can consent + * to a scope for an application, giving it permission to access that data on + * their behalf. OAuth scope specifications should be fairly coarse grained; + * a user will need to see and understand the text description of what your + * scope means. In most cases: use one or at most two OAuth scopes for an + * entire family of products. If your product has multiple APIs, you should + * probably be sharing the OAuth scope across all of those APIs. When you + * need finer grained OAuth consent screens: talk with your product management + * about how developers will use them in practice. Please note that even + * though each of the canonical scopes is enough for a request to be accepted + * and passed to the backend, a request can still fail due to the backend + * requiring additional scopes or permissions. + */ + export interface Schema$OAuthRequirements { + /** + * The list of publicly documented OAuth scopes that are allowed access. An + * OAuth token containing any of these scopes will be accepted. Example: + * canonical_scopes: https://www.googleapis.com/auth/calendar, + * https://www.googleapis.com/auth/calendar.read + */ + canonicalScopes?: string; + } + /** + * This resource represents a long-running operation that is the result of a + * network API call. + */ + export interface Schema$Operation { + /** + * If the value is `false`, it means the operation is still in progress. If + * `true`, the operation is completed, and either `error` or `response` is + * available. + */ + done?: boolean; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + */ + metadata?: any; + /** + * The server-assigned name, which is only unique within the same service + * that originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + */ + name?: string; + /** + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` is + * the original method name. For example, if the original method name is + * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: any; + } + /** + * A protocol buffer option, which can be attached to a message, field, + * enumeration, etc. + */ + export interface Schema$Option { + /** + * The option's name. For protobuf built-in options (options defined in + * descriptor.proto), this is the short name. For example, + * `"map_entry"`. For custom options, it should be the + * fully-qualified name. For example, `"google.api.http"`. + */ + name?: string; + /** + * The option's value packed in an Any message. If the value is a + * primitive, the corresponding wrapper type defined in + * google/protobuf/wrappers.proto should be used. If the value is an enum, + * it should be stored as an int32 value using the + * google.protobuf.Int32Value type. + */ + value?: any; + } + /** + * Represents a documentation page. A page can contain subpages to represent + * nested documentation set structure. + */ + export interface Schema$Page { + /** + * The Markdown content of the page. You can use <code>&#40;== + * include {path} ==&#41;</code> to include content from a + * Markdown file. + */ + content?: string; + /** + * The name of the page. It will be used as an identity of the page to + * generate URI of the page, text of the link to this page in navigation, + * etc. The full page name (start from the root page name to this page + * concatenated with `.`) can be used as reference to the page in your + * documentation. For example: <pre><code>pages: - name: + * Tutorial content: &#40;== include tutorial.md ==&#41; subpages: + * - name: Java content: &#40;== include tutorial_java.md + * ==&#41; </code></pre> You can reference `Java` page using + * Markdown reference link syntax: `Java`. + */ + name?: string; + /** + * Subpages of this page. The order of subpages specified here will be + * honored in the generated docset. + */ + subpages?: Schema$Page[]; + } + /** + * Quota configuration helps to achieve fairness and budgeting in service + * usage. The quota configuration works this way: - The service configuration + * defines a set of metrics. - For API calls, the quota.metric_rules maps + * methods to metrics with corresponding costs. - The quota.limits defines + * limits on the metrics, which will be used for quota checks at runtime. An + * example quota configuration in yaml format: quota: limits: - + * name: apiWriteQpsPerProject metric: + * library.googleapis.com/write_calls unit: "1/min/{project}" + * # rate limit for consumer projects values: STANDARD: 10000 + * # The metric rules bind all methods to the read_calls metric, # except + * for the UpdateBook and DeleteBook methods. These two methods # are + * mapped to the write_calls metric, with the UpdateBook method # + * consuming at twice rate as the DeleteBook method. metric_rules: - + * selector: "*" metric_costs: + * library.googleapis.com/read_calls: 1 - selector: + * google.example.library.v1.LibraryService.UpdateBook metric_costs: + * library.googleapis.com/write_calls: 2 - selector: + * google.example.library.v1.LibraryService.DeleteBook metric_costs: + * library.googleapis.com/write_calls: 1 Corresponding Metric definition: + * metrics: - name: library.googleapis.com/read_calls display_name: Read + * requests metric_kind: DELTA value_type: INT64 - name: + * library.googleapis.com/write_calls display_name: Write requests + * metric_kind: DELTA value_type: INT64 + */ + export interface Schema$Quota { + /** + * List of `QuotaLimit` definitions for the service. + */ + limits?: Schema$QuotaLimit[]; + /** + * List of `MetricRule` definitions, each one mapping a selected method to + * one or more metrics. + */ + metricRules?: Schema$MetricRule[]; + } + /** + * `QuotaLimit` defines a specific limit that applies over a specified + * duration for a limit type. There can be at most one limit for a duration + * and limit type combination defined within a `QuotaGroup`. + */ + export interface Schema$QuotaLimit { + /** + * Default number of tokens that can be consumed during the specified + * duration. This is the number of tokens assigned when a client application + * developer activates the service for his/her project. Specifying a value + * of 0 will block all requests. This can be used if you are provisioning + * quota to selected consumers and blocking others. Similarly, a value of -1 + * will indicate an unlimited quota. No other negative values are allowed. + * Used by group-based quotas only. + */ + defaultLimit?: string; + /** + * Optional. User-visible, extended description for this quota limit. Should + * be used only when more context is needed to understand this limit than + * provided by the limit's display name (see: `display_name`). + */ + description?: string; + /** + * User-visible display name for this limit. Optional. If not set, the UI + * will provide a default display name based on the quota configuration. + * This field can be used to override the default display name generated + * from the configuration. + */ + displayName?: string; + /** + * Duration of this limit in textual notation. Example: "100s", + * "24h", "1d". For duration longer than a day, only + * multiple of days is supported. We support only "100s" and + * "1d" for now. Additional support will be added in the future. + * "0" indicates indefinite duration. Used by group-based quotas + * only. + */ + duration?: string; + /** + * Free tier value displayed in the Developers Console for this limit. The + * free tier is the number of tokens that will be subtracted from the billed + * amount when billing is enabled. This field can only be set on a limit + * with duration "1d", in a billable group; it is invalid on any + * other limit. If this field is not set, it defaults to 0, indicating that + * there is no free tier for this service. Used by group-based quotas only. + */ + freeTier?: string; + /** + * Maximum number of tokens that can be consumed during the specified + * duration. Client application developers can override the default limit up + * to this maximum. If specified, this value cannot be set to a value less + * than the default limit. If not specified, it is set to the default limit. + * To allow clients to apply overrides with no upper bound, set this to -1, + * indicating unlimited maximum quota. Used by group-based quotas only. + */ + maxLimit?: string; + /** + * The name of the metric this quota limit applies to. The quota limits with + * the same metric will be checked together during runtime. The metric must + * be defined within the service config. + */ + metric?: string; + /** + * Name of the quota limit. The name must be provided, and it must be + * unique within the service. The name can only include alphanumeric + * characters as well as '-'. The maximum length of the limit name + * is 64 characters. + */ + name?: string; + /** + * Specify the unit of the quota limit. It uses the same syntax as + * Metric.unit. The supported unit kinds are determined by the quota backend + * system. Here are some examples: * "1/min/{project}" for quota + * per minute per project. Note: the order of unit components is + * insignificant. The "1" at the beginning is required to follow + * the metric unit syntax. + */ + unit?: string; + /** + * Tiered limit values. You must specify this as a key:value pair, with an + * integer value that is the maximum number of requests allowed for the + * specified unit. Currently only STANDARD is supported. + */ + values?: any; + } + /** + * `Service` is the root object of Google service configuration schema. It + * describes basic information about a service, such as the name and the + * title, and delegates other aspects to sub-sections. Each sub-section is + * either a proto message or a repeated proto message that configures a + * specific aspect, such as auth. See each proto message definition for + * details. Example: type: google.api.Service config_version: 3 + * name: calendar.googleapis.com title: Google Calendar API apis: - + * name: google.calendar.v3.Calendar authentication: providers: - + * id: google_calendar_auth jwks_uri: + * https://www.googleapis.com/oauth2/v1/certs issuer: + * https://securetoken.google.com rules: - selector: "*" + * requirements: provider_id: google_calendar_auth + */ + export interface Schema$Service { + /** + * A list of API interfaces exported by this service. Only the `name` field + * of the google.protobuf.Api needs to be provided by the configuration + * author, as the remaining fields will be derived from the IDL during the + * normalization process. It is an error to specify an API interface here + * which cannot be resolved against the associated IDL files. + */ + apis?: Schema$Api[]; + /** + * Auth configuration. + */ + authentication?: Schema$Authentication; + /** + * API backend configuration. + */ + backend?: Schema$Backend; + /** + * Billing configuration. + */ + billing?: Schema$Billing; + /** + * The semantic version of the service configuration. The config version + * affects the interpretation of the service configuration. For example, + * certain features are enabled by default for certain config versions. The + * latest config version is `3`. + */ + configVersion?: number; + /** + * Context configuration. + */ + context?: Schema$Context; + /** + * Configuration for the service control plane. + */ + control?: Schema$Control; + /** + * Custom error configuration. + */ + customError?: Schema$CustomError; + /** + * Additional API documentation. + */ + documentation?: Schema$Documentation; + /** + * Configuration for network endpoints. If this is empty, then an endpoint + * with the same name as the service is automatically generated to service + * all defined APIs. + */ + endpoints?: Schema$Endpoint[]; + /** + * A list of all enum types included in this API service. Enums referenced + * directly or indirectly by the `apis` are automatically included. Enums + * which are not referenced but shall be included should be listed here by + * name. Example: enums: - name: google.someapi.v1.SomeEnum + */ + enums?: Schema$Enum[]; + /** + * Experimental configuration. + */ + experimental?: Schema$Experimental; + /** + * HTTP configuration. + */ + http?: Schema$Http; + /** + * A unique ID for a specific instance of this message, typically assigned + * by the client for tracking purpose. If empty, the server may choose to + * generate one instead. Must be no longer than 60 characters. + */ + id?: string; + /** + * Logging configuration. + */ + logging?: Schema$Logging; + /** + * Defines the logs used by this service. + */ + logs?: Schema$LogDescriptor[]; + /** + * Defines the metrics used by this service. + */ + metrics?: Schema$MetricDescriptor[]; + /** + * Defines the monitored resources used by this service. This is required by + * the Service.monitoring and Service.logging configurations. + */ + monitoredResources?: Schema$MonitoredResourceDescriptor[]; + /** + * Monitoring configuration. + */ + monitoring?: Schema$Monitoring; + /** + * The DNS address at which this service is available, e.g. + * `calendar.googleapis.com`. + */ + name?: string; + /** + * The Google project that owns this service. + */ + producerProjectId?: string; + /** + * Quota configuration. + */ + quota?: Schema$Quota; + /** + * Output only. The source information for this configuration if available. + */ + sourceInfo?: Schema$SourceInfo; + /** + * System parameter configuration. + */ + systemParameters?: Schema$SystemParameters; + /** + * A list of all proto message types included in this API service. It serves + * similar purpose as [google.api.Service.types], except that these types + * are not needed by user-defined APIs. Therefore, they will not show up in + * the generated discovery doc. This field should only be used to define + * system APIs in ESF. + */ + systemTypes?: Schema$Type[]; + /** + * The product title for this service. + */ + title?: string; + /** + * A list of all proto message types included in this API service. Types + * referenced directly or indirectly by the `apis` are automatically + * included. Messages which are not referenced but shall be included, such + * as types used by the `google.protobuf.Any` type, should be listed here by + * name. Example: types: - name: google.protobuf.Int32 + */ + types?: Schema$Type[]; + /** + * Configuration controlling usage of this service. + */ + usage?: Schema$Usage; + } + /** + * `SourceContext` represents information about the source of a protobuf + * element, like the file in which it is defined. + */ + export interface Schema$SourceContext { + /** + * The path-qualified name of the .proto file that contained the associated + * protobuf element. For example: + * `"google/protobuf/source_context.proto"`. + */ + fileName?: string; + } + /** + * Source information used to create a Service Config + */ + export interface Schema$SourceInfo { + /** + * All files used during config generation. + */ + sourceFiles?: any[]; + } + /** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * - Simple to use and understand for most users - Flexible enough to meet + * unexpected needs # Overview The `Status` message contains three pieces of + * data: error code, error message, and error details. The error code should + * be an enum value of google.rpc.Code, but it may accept additional error + * codes if needed. The error message should be a developer-facing English + * message that helps developers *understand* and *resolve* the error. If a + * localized user-facing error message is needed, put the localized message in + * the error details or localize it in the client. The optional error details + * may contain arbitrary information about the error. There is a predefined + * set of error detail types in the package `google.rpc` that can be used for + * common error conditions. # Language mapping The `Status` message is the + * logical representation of the error model, but it is not necessarily the + * actual wire format. When the `Status` message is exposed in different + * client libraries and different wire protocols, it can be mapped + * differently. For example, it will likely be mapped to some exceptions in + * Java, but more likely mapped to some error codes in C. # Other uses The + * error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a consistent + * developer experience across different environments. Example uses of this + * error model include: - Partial errors. If a service needs to return + * partial errors to the client, it may embed the `Status` in the normal + * response to indicate the partial errors. - Workflow errors. A typical + * workflow has multiple steps. Each step may have a `Status` message for + * error reporting. - Batch operations. If a client uses batch request and + * batch response, the `Status` message should be used directly inside + * batch response, one for each error sub-response. - Asynchronous + * operations. If an API call embeds asynchronous operation results in its + * response, the status of those operations should be represented directly + * using the `Status` message. - Logging. If some API errors are stored in + * logs, the message `Status` could be used directly after any stripping + * needed for security/privacy reasons. + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number; + /** + * A list of messages that carry the error details. There is a common set + * of message types for APIs to use. + */ + details?: any[]; + /** + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized by the client. + */ + message?: string; + } + /** + * Message returning the created service subnetwork. + */ + export interface Schema$Subnetwork { + /** + * Subnetwork CIDR range in "10.x.x.x/y" format. + */ + ipCidrRange?: string; + /** + * Subnetwork name. See https://cloud.google.com/compute/docs/vpc/ + */ + name?: string; + } + /** + * Define a parameter's name and location. The parameter may be passed as + * either an HTTP header or a URL query parameter, and if both are passed the + * behavior is implementation-dependent. + */ + export interface Schema$SystemParameter { + /** + * Define the HTTP header name to use for the parameter. It is case + * insensitive. + */ + httpHeader?: string; + /** + * Define the name of the parameter, such as "api_key" . It is + * case sensitive. + */ + name?: string; + /** + * Define the URL query parameter name to use for the parameter. It is case + * sensitive. + */ + urlQueryParameter?: string; + } + /** + * Define a system parameter rule mapping system parameter definitions to + * methods. + */ + export interface Schema$SystemParameterRule { + /** + * Define parameters. Multiple names may be defined for a parameter. For a + * given method call, only one of them should be used. If multiple names are + * used the behavior is implementation-dependent. If none of the specified + * names are present the behavior is parameter-dependent. + */ + parameters?: Schema$SystemParameter[]; + /** + * Selects the methods to which this rule applies. Use '*' to + * indicate all methods in all APIs. Refer to selector for syntax details. + */ + selector?: string; + } + /** + * ### System parameter configuration A system parameter is a special kind of + * parameter defined by the API system, not by an individual API. It is + * typically mapped to an HTTP header and/or a URL query parameter. This + * configuration specifies which methods change the names of the system + * parameters. + */ + export interface Schema$SystemParameters { + /** + * Define system parameters. The parameters defined here will override the + * default parameters implemented by the system. If this field is missing + * from the service config, default system parameters will be used. Default + * system parameters and names is implementation-dependent. Example: define + * api key for all methods system_parameters rules: - + * selector: "*" parameters: - name: api_key + * url_query_parameter: api_key Example: define 2 api key names for a + * specific method. system_parameters rules: - selector: + * "/ListShelves" parameters: - name: + * api_key http_header: Api-Key1 - name: api_key + * http_header: Api-Key2 **NOTE:** All service configuration rules follow + * "last one wins" order. + */ + rules?: Schema$SystemParameterRule[]; + } + /** + * A protocol buffer message type. + */ + export interface Schema$Type { + /** + * The list of fields. + */ + fields?: Schema$Field[]; + /** + * The fully qualified message name. + */ + name?: string; + /** + * The list of types appearing in `oneof` definitions in this type. + */ + oneofs?: string[]; + /** + * The protocol buffer options. + */ + options?: Schema$Option[]; + /** + * The source context. + */ + sourceContext?: Schema$SourceContext; + /** + * The source syntax. + */ + syntax?: string; + } + /** + * Configuration controlling usage of a service. + */ + export interface Schema$Usage { + /** + * The full resource name of a channel used for sending notifications to the + * service producer. Google Service Management currently only supports + * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification + * channel. To use Google Cloud Pub/Sub as the channel, this must be the + * name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name + * format documented in https://cloud.google.com/pubsub/docs/overview. + */ + producerNotificationChannel?: string; + /** + * Requirements that must be satisfied before a consumer project can use the + * service. Each requirement is of the form + * <service.name>/<requirement-id>; for example + * 'serviceusage.googleapis.com/billing-enabled'. + */ + requirements?: string[]; + /** + * A list of usage rules that apply to individual API methods. **NOTE:** + * All service configuration rules follow "last one wins" order. + */ + rules?: Schema$UsageRule[]; + } + /** + * Usage configuration rules for the service. NOTE: Under development. Use + * this rule to configure unregistered calls for the service. Unregistered + * calls are calls that do not contain consumer project identity. (Example: + * calls that do not contain an API key). By default, API methods do not allow + * unregistered calls, and each method call must be identified by a consumer + * project identity. Use this rule to allow/disallow unregistered calls. + * Example of an API that wants to allow unregistered calls for entire + * service. usage: rules: - selector: "*" + * allow_unregistered_calls: true Example of a method that wants to allow + * unregistered calls. usage: rules: - selector: + * "google.example.library.v1.LibraryService.CreateBook" + * allow_unregistered_calls: true + */ + export interface Schema$UsageRule { + /** + * If true, the selected method allows unregistered calls, e.g. calls that + * don't identify any user or application. + */ + allowUnregisteredCalls?: boolean; + /** + * Selects the methods to which this rule applies. Use '*' to + * indicate all methods in all APIs. Refer to selector for syntax details. + */ + selector?: string; + /** + * If true, the selected method should skip service control and the control + * plane features, such as quota and billing, will not be available. This + * flag is used by Google Cloud Endpoints to bypass checks for internal + * methods, such as service health check methods. + */ + skipServiceControl?: boolean; + } + + + export class Resource$Operations { + root: Servicenetworking; + constructor(root: Servicenetworking) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * servicenetworking.operations.get + * @desc Gets the latest state of a long-running operation. Clients can use + * this method to poll the operation result at intervals as recommended by + * the API service. + * @alias servicenetworking.operations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + get(params?: Params$Resource$Operations$Get, + options?: MethodOptions): AxiosPromise; + get(params: Params$Resource$Operations$Get, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + get(params: Params$Resource$Operations$Get, + callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; + get(paramsOrCallback?: Params$Resource$Operations$Get| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://servicenetworking.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$Get { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + + + export class Resource$Services { + root: Servicenetworking; + connections: Resource$Services$Connections; + constructor(root: Servicenetworking) { + this.root = root; + this.getRoot.bind(this); + this.connections = new Resource$Services$Connections(root); + } + + getRoot() { + return this.root; + } + + + /** + * servicenetworking.services.addSubnetwork + * @desc Service producers use this method to provision a new subnet in + * peered service shared VPC network. It will validate previously provided + * allocated ranges, find non-conflicting sub-range of requested size + * (expressed in number of leading bits of ipv4 network mask, as in CIDR + * range notation). It will then create a subnetwork in the request region. + * The subsequent call will try to reuse the subnetwork previously created + * if subnetwork name, region and prefix length of the IP range match. + * Operation + * @alias servicenetworking.services.addSubnetwork + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. This is a 'tenant' project in the service producer organization. services/{service}/{collection-id}/{resource-id} {collection id} is the cloud resource collection type representing the tenant project. Only 'projects' are currently supported. {resource id} is the tenant project numeric id: '123456'. {service} the name of the peering service, for example 'service-peering.example.com'. This service must be activated. in the consumer project. + * @param {().AddSubnetworkRequest} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + addSubnetwork( + params?: Params$Resource$Services$Addsubnetwork, + options?: MethodOptions): AxiosPromise; + addSubnetwork( + params: Params$Resource$Services$Addsubnetwork, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + addSubnetwork( + params: Params$Resource$Services$Addsubnetwork, + callback: BodyResponseCallback): void; + addSubnetwork(callback: BodyResponseCallback): void; + addSubnetwork( + paramsOrCallback?: Params$Resource$Services$Addsubnetwork| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Services$Addsubnetwork; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Services$Addsubnetwork; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://servicenetworking.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}:addSubnetwork') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Services$Addsubnetwork { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Required. This is a 'tenant' project in the service producer + * organization. services/{service}/{collection-id}/{resource-id} + * {collection id} is the cloud resource collection type representing the + * tenant project. Only 'projects' are currently supported. {resource id} is + * the tenant project numeric id: '123456'. {service} the name of the + * peering service, for example 'service-peering.example.com'. This service + * must be activated. in the consumer project. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AddSubnetworkRequest; + } + + export class Resource$Services$Connections { + root: Servicenetworking; + constructor(root: Servicenetworking) { + this.root = root; + this.getRoot.bind(this); + } + + getRoot() { + return this.root; + } + + + /** + * servicenetworking.services.connections.create + * @desc To connect service to a VPC network peering connection must be + * established prior to service provisioning. This method must be invoked by + * the consumer VPC network administrator It will establish a permanent + * peering connection with a shared network created in the service producer + * organization and register a allocated IP range(s) to be used for service + * subnetwork provisioning. This connection will be used for all supported + * services in the service producer organization, so it only needs to be + * invoked once. Operation. + * @alias servicenetworking.services.connections.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Provider peering service that is managing peering connectivity for a service provider organization. For Google services that support this functionality it is 'services/servicenetworking.googleapis.com'. + * @param {().Connection} params.resource Request body data + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + create( + params?: Params$Resource$Services$Connections$Create, + options?: MethodOptions): AxiosPromise; + create( + params: Params$Resource$Services$Connections$Create, + options: MethodOptions|BodyResponseCallback, + callback: BodyResponseCallback): void; + create( + params: Params$Resource$Services$Connections$Create, + callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: Params$Resource$Services$Connections$Create| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = (paramsOrCallback || {}) as + Params$Resource$Services$Connections$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Services$Connections$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://servicenetworking.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}/connections') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'POST' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + + /** + * servicenetworking.services.connections.list + * @desc Service consumers use this method to list configured peering + * connection for the given service and consumer network. + * @alias servicenetworking.services.connections.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.network Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project}/global/networks/{network}'. {project} is a project number, as in '12345' {network} is network name. + * @param {string} params.parent Provider peering service that is managing peering connectivity for a service provider organization. For Google services that support this functionality it is 'services/servicenetworking.googleapis.com'. + * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. + * @param {callback} callback The callback that handles the response. + * @return {object} Request object + */ + list( + params?: Params$Resource$Services$Connections$List, + options?: MethodOptions): AxiosPromise; + list( + params: Params$Resource$Services$Connections$List, + options: MethodOptions| + BodyResponseCallback, + callback: BodyResponseCallback): void; + list( + params: Params$Resource$Services$Connections$List, + callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: Params$Resource$Services$Connections$List| + BodyResponseCallback, + optionsOrCallback?: MethodOptions| + BodyResponseCallback, + callback?: BodyResponseCallback): + void|AxiosPromise { + let params = + (paramsOrCallback || {}) as Params$Resource$Services$Connections$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Services$Connections$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://servicenetworking.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}/connections') + .replace(/([^:]\/)\/+/g, '$1'), + method: 'GET' + }, + options), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.getRoot() + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Services$Connections$Create { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Provider peering service that is managing peering connectivity for a + * service provider organization. For Google services that support this + * functionality it is 'services/servicenetworking.googleapis.com'. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Connection; + } + export interface Params$Resource$Services$Connections$List { + /** + * Auth client or API Key for the request + */ + auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient; + + /** + * Network name in the consumer project. This network must have been + * already peered with a shared VPC network using CreateConnection method. + * Must be in a form 'projects/{project}/global/networks/{network}'. + * {project} is a project number, as in '12345' {network} is network name. + */ + network?: string; + /** + * Provider peering service that is managing peering connectivity for a + * service provider organization. For Google services that support this + * functionality it is 'services/servicenetworking.googleapis.com'. + */ + parent?: string; + } +} diff --git a/src/apis/serviceusage/v1.ts b/src/apis/serviceusage/v1.ts index cac7b3e41e5..3a84c89dbb0 100644 --- a/src/apis/serviceusage/v1.ts +++ b/src/apis/serviceusage/v1.ts @@ -1047,7 +1047,7 @@ export namespace serviceusage_v1 { * controls how fields of the request message are mapped to the URL path. * Example: service Messaging { rpc GetMessage(GetMessageRequest) * returns (Message) { option (google.api.http) = { get: - * "/v1/{name=messages/*"}" }; } } message + * "/v1/{name=messages/*}" }; } } message * GetMessageRequest { string name = 1; // Mapped to URL path. } * message Message { string text = 1; // The resource content. } * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC diff --git a/src/apis/serviceusage/v1beta1.ts b/src/apis/serviceusage/v1beta1.ts index 4f7f0b2a5b4..711e207527a 100644 --- a/src/apis/serviceusage/v1beta1.ts +++ b/src/apis/serviceusage/v1beta1.ts @@ -1034,7 +1034,7 @@ export namespace serviceusage_v1beta1 { * controls how fields of the request message are mapped to the URL path. * Example: service Messaging { rpc GetMessage(GetMessageRequest) * returns (Message) { option (google.api.http) = { get: - * "/v1/{name=messages/*"}" }; } } message + * "/v1/{name=messages/*}" }; } } message * GetMessageRequest { string name = 1; // Mapped to URL path. } * message Message { string text = 1; // The resource content. } * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC diff --git a/src/apis/serviceuser/v1.ts b/src/apis/serviceuser/v1.ts index 438083d9383..40025116bbe 100644 --- a/src/apis/serviceuser/v1.ts +++ b/src/apis/serviceuser/v1.ts @@ -732,7 +732,7 @@ export namespace serviceuser_v1 { * controls how fields of the request message are mapped to the URL path. * Example: service Messaging { rpc GetMessage(GetMessageRequest) * returns (Message) { option (google.api.http) = { get: - * "/v1/{name=messages/*"}" }; } } message + * "/v1/{name=messages/*}" }; } } message * GetMessageRequest { string name = 1; // Mapped to URL path. } * message Message { string text = 1; // The resource content. } * This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC diff --git a/src/apis/spanner/v1.ts b/src/apis/spanner/v1.ts index 4583483eea5..a0667202d2e 100644 --- a/src/apis/spanner/v1.ts +++ b/src/apis/spanner/v1.ts @@ -330,13 +330,30 @@ export namespace spanner_v1 { * parameters must exactly match the request that yielded this token. */ resumeToken?: string; + /** + * A per-transaction sequence number used to identify this request. This + * makes each request idempotent such that if the request is received + * multiple times, at most one will succeed. The sequence number must be + * monotonically increasing within the transaction. If a request arrives for + * the first time with an out-of-order sequence number, the transaction may + * be aborted. Replays of previously handled requests will yield the same + * response as the first execution. Required for DML statements. Ignored + * for queries. + */ + seqno?: string; /** * Required. The SQL string. */ sql?: string; /** * The transaction to use. If none is provided, the default is a temporary - * read-only transaction with strong concurrency. + * read-only transaction with strong concurrency. The transaction to use. + * For queries, if none is provided, the default is a temporary read-only + * transaction with strong concurrency. Standard DML statements require a + * ReadWrite transaction. Single-use transactions are not supported (to + * avoid replay). The caller must either supply an existing transaction ID + * or begin a new transaction. Partitioned DML requires an existing + * PartitionedDml transaction ID. */ transaction?: Schema$TransactionSelector; } @@ -738,7 +755,8 @@ export namespace spanner_v1 { * Query plan and execution statistics for the statement that produced this * streaming result set. These can be requested by setting * ExecuteSqlRequest.query_mode and are sent only once with the last - * response in the stream. + * response in the stream. This field will also be present in the last + * response for DML statements. */ stats?: Schema$ResultSetStats; /** @@ -802,6 +820,10 @@ export namespace spanner_v1 { */ partitionToken?: string; } + /** + * Message type to initiate a Partitioned DML transaction. + */ + export interface Schema$PartitionedDml {} /** * Options for a PartitionQueryRequest and PartitionReadRequest. */ @@ -860,7 +882,9 @@ export namespace spanner_v1 { * partitionable query has a single distributed union operator. A * distributed union operator conceptually divides one or more tables into * multiple splits, remotely evaluates a subquery independently on each - * split, and then unions all results. + * split, and then unions all results. This must not contain DML commands, + * such as INSERT, UPDATE, or DELETE. Use ExecuteStreamingSql with a + * PartitionedDml transaction for large, partition-friendly DML operations. */ sql?: string; /** @@ -1151,6 +1175,10 @@ export namespace spanner_v1 { /** * Query plan and execution statistics for the SQL statement that produced * this result set. These can be requested by setting + * ExecuteSqlRequest.query_mode. DML statements always produce stats + * containing the number of rows modified, unless executed using the + * ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other + * fields may or may not be populated, based on the * ExecuteSqlRequest.query_mode. */ stats?: Schema$ResultSetStats; @@ -1191,6 +1219,15 @@ export namespace spanner_v1 { * "1.19 secs" } */ queryStats?: any; + /** + * Standard DML returns an exact count of rows that were modified. + */ + rowCountExact?: string; + /** + * Partitioned DML does not offer exactly-once semantics, so it returns a + * lower bound of the rows modified. + */ + rowCountLowerBound?: string; } /** * The request for Rollback. @@ -1372,15 +1409,20 @@ export namespace spanner_v1 { * time. After the active transaction is completed, the session can * immediately be re-used for the next transaction. It is not necessary to * create a new session for each transaction. # Transaction Modes Cloud - * Spanner supports two transaction modes: 1. Locking read-write. This type - * of transaction is the only way to write data into Cloud Spanner. These - * transactions rely on pessimistic locking and, if necessary, two-phase - * commit. Locking read-write transactions may abort, requiring the - * application to retry. 2. Snapshot read-only. This transaction type - * provides guaranteed consistency across several reads, but does not - * allow writes. Snapshot read-only transactions can be configured to + * Spanner supports three transaction modes: 1. Locking read-write. This + * type of transaction is the only way to write data into Cloud Spanner. + * These transactions rely on pessimistic locking and, if necessary, + * two-phase commit. Locking read-write transactions may abort, requiring + * the application to retry. 2. Snapshot read-only. This transaction + * type provides guaranteed consistency across several reads, but does + * not allow writes. Snapshot read-only transactions can be configured to * read at timestamps in the past. Snapshot read-only transactions do not - * need to be committed. For transactions that only read, snapshot read-only + * need to be committed. 3. Partitioned DML. This type of transaction is + * used to execute a single Partitioned DML statement. Partitioned DML + * partitions the key space and runs the DML statement over each + * partition in parallel using separate, internal transactions that + * commit independently. Partitioned DML transactions do not need to be + * committed. For transactions that only read, snapshot read-only * transactions provide simpler semantics and are almost always faster. In * particular, read-only transactions do not take locks, so they do not * conflict with read-write transactions. As a consequence of not taking @@ -1395,10 +1437,8 @@ export namespace spanner_v1 { * locks active as long as the transaction continues to do reads, and the * transaction has not been terminated by Commit or Rollback. Long periods of * inactivity at the client may cause Cloud Spanner to release a - * transaction's locks and abort it. Reads performed within a transaction - * acquire locks on the data being read. Writes can only be done at commit - * time, after all reads have been completed. Conceptually, a read-write - * transaction consists of zero or more reads or SQL queries followed by + * transaction's locks and abort it. Conceptually, a read-write + * transaction consists of zero or more reads or SQL statements followed by * Commit. At any time before Commit, the client can send a Rollback request * to abort the transaction. ### Semantics Cloud Spanner can commit the * transaction if all read locks it acquired are still valid at commit time, @@ -1494,8 +1534,53 @@ export namespace spanner_v1 { * restriction also applies to in-progress reads and/or SQL queries whose * timestamp become too old while executing. Reads and SQL queries with * too-old read timestamps fail with the error `FAILED_PRECONDITION`. ## + * Partitioned DML Transactions Partitioned DML transactions are used to + * execute DML statements with a different execution strategy that provides + * different, and often better, scalability properties for large, table-wide + * operations than DML in a ReadWrite transaction. Smaller scoped statements, + * such as an OLTP workload, should prefer using ReadWrite transactions. + * Partitioned DML partitions the keyspace and runs the DML statement on each + * partition in separate, internal transactions. These transactions commit + * automatically when complete, and run independently from one another. To + * reduce lock contention, this execution strategy only acquires read locks on + * rows that match the WHERE clause of the statement. Additionally, the + * smaller per-partition transactions hold locks for less time. That said, + * Partitioned DML is not a drop-in replacement for standard DML used in + * ReadWrite transactions. - The DML statement must be fully-partitionable. + * Specifically, the statement must be expressible as the union of many + * statements which each access only a single row of the table. - The + * statement is not applied atomically to all rows of the table. Rather, the + * statement is applied atomically to partitions of the table, in independent + * transactions. Secondary index rows are updated atomically with the base + * table rows. - Partitioned DML does not guarantee exactly-once execution + * semantics against a partition. The statement will be applied at least + * once to each partition. It is strongly recommended that the DML + * statement should be idempotent to avoid unexpected results. For + * instance, it is potentially dangerous to run a statement such as `UPDATE + * table SET column = column + 1` as it could be run multiple times against + * some rows. - The partitions are committed automatically - there is no + * support for Commit or Rollback. If the call returns an error, or if the + * client issuing the ExecuteSql call dies, it is possible that some rows + * had the statement executed on them successfully. It is also possible + * that statement was never executed against other rows. - Partitioned + * DML transactions may only contain the execution of a single DML + * statement via ExecuteSql or ExecuteStreamingSql. - If any error is + * encountered during the execution of the partitioned DML operation (for + * instance, a UNIQUE INDEX violation, division by zero, or a value that + * cannot be stored due to schema constraints), then the operation is + * stopped at that point and an error is returned. It is possible that at + * this point, some partitions have been committed (or even committed + * multiple times), and other partitions have not been run at all. Given the + * above, Partitioned DML is good fit for large, database-wide, operations + * that are idempotent, such as deleting old rows from a very large table. */ export interface Schema$TransactionOptions { + /** + * Partitioned DML transaction. Authorization to begin a Partitioned DML + * transaction requires `spanner.databases.beginPartitionedDmlTransaction` + * permission on the `session` resource. + */ + partitionedDml?: Schema$PartitionedDml; /** * Transaction will not write. Authorization to begin a read-only * transaction requires `spanner.databases.beginReadOnlyTransaction` diff --git a/src/apis/streetviewpublish/v1.ts b/src/apis/streetviewpublish/v1.ts index a25825182dc..7e6d0aae99b 100644 --- a/src/apis/streetviewpublish/v1.ts +++ b/src/apis/streetviewpublish/v1.ts @@ -314,9 +314,12 @@ export namespace streetviewpublish_v1 { */ export interface Schema$Pose { /** - * The estimated horizontal accuracy of this pose in meters with 68% (one - * standard deviation) confidence. For more information, see: - * https://developer.android.com/reference/android/location/Location#getAccuracy() + * The estimated horizontal accuracy of this pose in meters with 68% + * confidence (one standard deviation). For example, on Android, this value + * is available from this method: + * https://developer.android.com/reference/android/location/Location#getAccuracy(). + * Other platforms have different methods of obtaining similar accuracy + * estimations. */ accuracyMeters?: number; /** diff --git a/src/apis/testing/v1.ts b/src/apis/testing/v1.ts index 8c70ee04afd..41c4132f044 100644 --- a/src/apis/testing/v1.ts +++ b/src/apis/testing/v1.ts @@ -698,6 +698,10 @@ export namespace testing_v1 { * Output only. The set of supported iOS software versions. */ versions?: Schema$IosVersion[]; + /** + * Output only. The set of supported Xcode versions. + */ + xcodeVersions?: Schema$XcodeVersion[]; } /** * A list of iOS device configurations in which the test is to be executed. @@ -785,6 +789,10 @@ export namespace testing_v1 { * "1", "2" */ minorVersion?: number; + /** + * Output only. The available Xcode versions for this version. + */ + supportedXcodeVersionIds?: string[]; /** * Output only. Tags for this dimension. Examples: "default", * "preview", "deprecated" @@ -806,6 +814,12 @@ export namespace testing_v1 { * ignored if the xctestrun field is specified. */ testsZip?: Schema$FileReference; + /** + * Optional. The Xcode version that should be used for the test. Use the + * EnvironmentDiscoveryService to get supported options. Defaults to the + * latest Xcode version Firebase Test Lab supports. + */ + xcodeVersion?: string; /** * Optional. An .xctestrun file that will override the .xctestrun file in * the tests zip. Because the .xctestrun file contains environment variables @@ -1302,6 +1316,19 @@ export namespace testing_v1 { */ packetLossRatio?: number; } + /** + * An Xcode version that an iOS version is compatible with. + */ + export interface Schema$XcodeVersion { + /** + * Output only. Tags for this Xcode version. Examples: "default" + */ + tags?: string[]; + /** + * Output only. The id for this version. Example: "9.2" + */ + version?: string; + } export class Resource$Applicationdetailservice { diff --git a/src/apis/videointelligence/v1.ts b/src/apis/videointelligence/v1.ts index 746f43a8cdd..9df1c5772d9 100644 --- a/src/apis/videointelligence/v1.ts +++ b/src/apis/videointelligence/v1.ts @@ -508,6 +508,15 @@ export namespace videointelligence_v1 { * `enable_word_time_offsets`. */ export interface Schema$GoogleCloudVideointelligenceV1p1beta1_WordInfo { + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. This field is + * not guaranteed to be accurate and users should not rely on it to be + * always provided. The default of 0.0 is a sentinel value indicating + * `confidence` was not set. + */ + confidence?: number; /** * Time offset relative to the beginning of the audio, and corresponding to * the end of the spoken word. This field is only set if @@ -515,6 +524,14 @@ export namespace videointelligence_v1 { * an experimental feature and the accuracy of the time offset can vary. */ endTime?: string; + /** + * Output only. A distinct integer value is assigned for every speaker + * within the audio. This field specifies which one of those speakers was + * detected to have spoken this word. Value ranges from 1 up to + * diarization_speaker_count, and is only set if speaker diarization is + * enabled. + */ + speakerTag?: number; /** * Time offset relative to the beginning of the audio, and corresponding to * the start of the spoken word. This field is only set if @@ -527,6 +544,353 @@ export namespace videointelligence_v1 { */ word?: string; } + /** + * Video annotation progress. Included in the `metadata` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress { + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + */ + annotationProgress?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress[]; + } + /** + * Video annotation response. Included in the `response` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse { + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + */ + annotationResults?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults[]; + } + /** + * Detected entity from video analysis. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_Entity { + /** + * Textual description, e.g. `Fixed-gear bicycle`. + */ + description?: string; + /** + * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph + * Search API](https://developers.google.com/knowledge-graph/). + */ + entityId?: string; + /** + * Language code for `description` in BCP-47 format. + */ + languageCode?: string; + } + /** + * Explicit content annotation (based on per-frame visual signals only). If no + * explicit content has been detected in a frame, no annotations are present + * for that frame. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation { + /** + * All video frames where explicit content was detected. + */ + frames?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame[]; + } + /** + * Video frame level annotation results for explicit content. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame { + /** + * Likelihood of the pornography content.. + */ + pornographyLikelihood?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Label annotation. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation { + /** + * Common categories for the detected entity. E.g. when the label is + * `Terrier` the category is likely `dog`. And in some cases there might be + * more than one categories e.g. `Terrier` could also be a `pet`. + */ + categoryEntities?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity[]; + /** + * Detected entity. + */ + entity?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity; + /** + * All video frames where a label was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelFrame[]; + /** + * All video segments where a label was detected. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelSegment[]; + } + /** + * Video frame level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelFrame { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelSegment { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Video segment where a label was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Normalized bounding box. The normalized vertex coordinates are relative to + * the original image. Range: [0, 1]. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox { + /** + * Bottom Y coordinate. + */ + bottom?: number; + /** + * Left X coordinate. + */ + left?: number; + /** + * Right X coordinate. + */ + right?: number; + /** + * Top Y coordinate. + */ + top?: number; + } + /** + * Normalized bounding polygon for text (that might not be aligned with axis). + * Contains list of the corner points in clockwise order starting from + * top-left corner. For example, for a rectangular bounding box: When the text + * is horizontal it might look like: 0----1 | | 3----2 When + * it's clockwise rotated 180 degrees around the top-left corner it + * becomes: 2----3 | | 1----0 and the vertex order + * will still be (0, 1, 2, 3). Note that values can be less than 0, or greater + * than 1 due to trignometric calculations for location of the box. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly { + /** + * Normalized vertices of the bounding polygon. + */ + vertices?: Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex[]; + } + /** + * A vertex represents a 2D point in the image. NOTE: the normalized vertex + * coordinates are relative to the original image and range from 0 to 1. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex { + /** + * X coordinate. + */ + x?: number; + /** + * Y coordinate. + */ + y?: number; + } + /** + * Annotations corresponding to one tracked object. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation { + /** + * Object category's labeling confidence of this track. + */ + confidence?: number; + /** + * Entity to specify the object category that this track is labeled as. + */ + entity?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity; + /** + * Information corresponding to all frames where this object track appears. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame[]; + /** + * Each object track corresponds to one video segment where it appears. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Video frame level annotations for object detection and tracking. This field + * stores per frame location, time offset, and confidence. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame { + /** + * The normalized bounding box location of this object track for the frame. + */ + normalizedBoundingBox?: + Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox; + /** + * The timestamp of the frame in microseconds. + */ + timeOffset?: string; + } + /** + * Annotations related to one detected OCR text snippet. This will contain the + * corresponding text, confidence value, and frame level information for each + * detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextAnnotation { + /** + * Confidence for the track of detected text. It is calculated as the + * highest over all frames where OCR detected text appears. + */ + confidence?: number; + /** + * Information related to the frames where OCR detected text appears. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_TextFrame[]; + /** + * All video segments where OCR detected text appears. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p2beta1_TextSegment[]; + /** + * The detected text. + */ + text?: string; + } + /** + * Video frame level annotation results for text annotation (OCR). Contains + * information regarding timestamp and bounding box locations for the frames + * containing detected OCR text snippets. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextFrame { + /** + * Bounding polygon of the detected text for this frame. + */ + rotatedBoundingBox?: + Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly; + /** + * Timestamp of this frame. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for text detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextSegment { + /** + * Video segment where a text snippet was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Annotation progress for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress { + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Approximate percentage processed thus far. Guaranteed to be 100 when + * fully processed. + */ + progressPercent?: number; + /** + * Time when the request was received. + */ + startTime?: string; + /** + * Time of the most recent update. + */ + updateTime?: string; + } + /** + * Annotation results for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults { + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + */ + error?: Schema$GoogleRpc_Status; + /** + * Explicit content annotation. + */ + explicitAnnotation?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation; + /** + * Label annotations on frame level. There is exactly one element for each + * unique label. + */ + frameLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Annotations for list of objects detected and tracked in video. + */ + objectAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation[]; + /** + * Label annotations on video level or user specified segment level. There + * is exactly one element for each unique label. + */ + segmentLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * Shot annotations. Each shot is represented as a video segment. + */ + shotAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment[]; + /** + * Label annotations on shot level. There is exactly one element for each + * unique label. + */ + shotLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * OCR text detection and tracking. Annotations for list of detected text + * snippets. Each will have list of frame information associated with it. + */ + textAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_TextAnnotation[]; + } + /** + * Video segment. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment { + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * end of the segment (inclusive). + */ + endTimeOffset?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * start of the segment (inclusive). + */ + startTimeOffset?: string; + } /** * Video annotation progress. Included in the `metadata` field of the * `Operation` returned by the `GetOperation` call of the diff --git a/src/apis/videointelligence/v1beta2.ts b/src/apis/videointelligence/v1beta2.ts index 208f55b6165..335f0124c34 100644 --- a/src/apis/videointelligence/v1beta2.ts +++ b/src/apis/videointelligence/v1beta2.ts @@ -624,6 +624,15 @@ export namespace videointelligence_v1beta2 { * `enable_word_time_offsets`. */ export interface Schema$GoogleCloudVideointelligenceV1p1beta1_WordInfo { + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. This field is + * not guaranteed to be accurate and users should not rely on it to be + * always provided. The default of 0.0 is a sentinel value indicating + * `confidence` was not set. + */ + confidence?: number; /** * Time offset relative to the beginning of the audio, and corresponding to * the end of the spoken word. This field is only set if @@ -631,6 +640,14 @@ export namespace videointelligence_v1beta2 { * an experimental feature and the accuracy of the time offset can vary. */ endTime?: string; + /** + * Output only. A distinct integer value is assigned for every speaker + * within the audio. This field specifies which one of those speakers was + * detected to have spoken this word. Value ranges from 1 up to + * diarization_speaker_count, and is only set if speaker diarization is + * enabled. + */ + speakerTag?: number; /** * Time offset relative to the beginning of the audio, and corresponding to * the start of the spoken word. This field is only set if @@ -643,6 +660,353 @@ export namespace videointelligence_v1beta2 { */ word?: string; } + /** + * Video annotation progress. Included in the `metadata` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress { + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + */ + annotationProgress?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress[]; + } + /** + * Video annotation response. Included in the `response` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse { + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + */ + annotationResults?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults[]; + } + /** + * Detected entity from video analysis. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_Entity { + /** + * Textual description, e.g. `Fixed-gear bicycle`. + */ + description?: string; + /** + * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph + * Search API](https://developers.google.com/knowledge-graph/). + */ + entityId?: string; + /** + * Language code for `description` in BCP-47 format. + */ + languageCode?: string; + } + /** + * Explicit content annotation (based on per-frame visual signals only). If no + * explicit content has been detected in a frame, no annotations are present + * for that frame. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation { + /** + * All video frames where explicit content was detected. + */ + frames?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame[]; + } + /** + * Video frame level annotation results for explicit content. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame { + /** + * Likelihood of the pornography content.. + */ + pornographyLikelihood?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Label annotation. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation { + /** + * Common categories for the detected entity. E.g. when the label is + * `Terrier` the category is likely `dog`. And in some cases there might be + * more than one categories e.g. `Terrier` could also be a `pet`. + */ + categoryEntities?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity[]; + /** + * Detected entity. + */ + entity?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity; + /** + * All video frames where a label was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelFrame[]; + /** + * All video segments where a label was detected. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelSegment[]; + } + /** + * Video frame level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelFrame { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelSegment { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Video segment where a label was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Normalized bounding box. The normalized vertex coordinates are relative to + * the original image. Range: [0, 1]. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox { + /** + * Bottom Y coordinate. + */ + bottom?: number; + /** + * Left X coordinate. + */ + left?: number; + /** + * Right X coordinate. + */ + right?: number; + /** + * Top Y coordinate. + */ + top?: number; + } + /** + * Normalized bounding polygon for text (that might not be aligned with axis). + * Contains list of the corner points in clockwise order starting from + * top-left corner. For example, for a rectangular bounding box: When the text + * is horizontal it might look like: 0----1 | | 3----2 When + * it's clockwise rotated 180 degrees around the top-left corner it + * becomes: 2----3 | | 1----0 and the vertex order + * will still be (0, 1, 2, 3). Note that values can be less than 0, or greater + * than 1 due to trignometric calculations for location of the box. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly { + /** + * Normalized vertices of the bounding polygon. + */ + vertices?: Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex[]; + } + /** + * A vertex represents a 2D point in the image. NOTE: the normalized vertex + * coordinates are relative to the original image and range from 0 to 1. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex { + /** + * X coordinate. + */ + x?: number; + /** + * Y coordinate. + */ + y?: number; + } + /** + * Annotations corresponding to one tracked object. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation { + /** + * Object category's labeling confidence of this track. + */ + confidence?: number; + /** + * Entity to specify the object category that this track is labeled as. + */ + entity?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity; + /** + * Information corresponding to all frames where this object track appears. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame[]; + /** + * Each object track corresponds to one video segment where it appears. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Video frame level annotations for object detection and tracking. This field + * stores per frame location, time offset, and confidence. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame { + /** + * The normalized bounding box location of this object track for the frame. + */ + normalizedBoundingBox?: + Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox; + /** + * The timestamp of the frame in microseconds. + */ + timeOffset?: string; + } + /** + * Annotations related to one detected OCR text snippet. This will contain the + * corresponding text, confidence value, and frame level information for each + * detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextAnnotation { + /** + * Confidence for the track of detected text. It is calculated as the + * highest over all frames where OCR detected text appears. + */ + confidence?: number; + /** + * Information related to the frames where OCR detected text appears. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_TextFrame[]; + /** + * All video segments where OCR detected text appears. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p2beta1_TextSegment[]; + /** + * The detected text. + */ + text?: string; + } + /** + * Video frame level annotation results for text annotation (OCR). Contains + * information regarding timestamp and bounding box locations for the frames + * containing detected OCR text snippets. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextFrame { + /** + * Bounding polygon of the detected text for this frame. + */ + rotatedBoundingBox?: + Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly; + /** + * Timestamp of this frame. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for text detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextSegment { + /** + * Video segment where a text snippet was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Annotation progress for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress { + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Approximate percentage processed thus far. Guaranteed to be 100 when + * fully processed. + */ + progressPercent?: number; + /** + * Time when the request was received. + */ + startTime?: string; + /** + * Time of the most recent update. + */ + updateTime?: string; + } + /** + * Annotation results for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults { + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + */ + error?: Schema$GoogleRpc_Status; + /** + * Explicit content annotation. + */ + explicitAnnotation?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation; + /** + * Label annotations on frame level. There is exactly one element for each + * unique label. + */ + frameLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Annotations for list of objects detected and tracked in video. + */ + objectAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation[]; + /** + * Label annotations on video level or user specified segment level. There + * is exactly one element for each unique label. + */ + segmentLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * Shot annotations. Each shot is represented as a video segment. + */ + shotAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment[]; + /** + * Label annotations on shot level. There is exactly one element for each + * unique label. + */ + shotLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * OCR text detection and tracking. Annotations for list of detected text + * snippets. Each will have list of frame information associated with it. + */ + textAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_TextAnnotation[]; + } + /** + * Video segment. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment { + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * end of the segment (inclusive). + */ + endTimeOffset?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * start of the segment (inclusive). + */ + startTimeOffset?: string; + } /** * Video annotation progress. Included in the `metadata` field of the * `Operation` returned by the `GetOperation` call of the diff --git a/src/apis/videointelligence/v1p1beta1.ts b/src/apis/videointelligence/v1p1beta1.ts index 69f755797f4..c6fba01a40b 100644 --- a/src/apis/videointelligence/v1p1beta1.ts +++ b/src/apis/videointelligence/v1p1beta1.ts @@ -531,6 +531,12 @@ export namespace videointelligence_v1p1beta1 { * audio tracks, specify up to two tracks. Default: track 0. */ audioTracks?: number[]; + /** + * *Optional* If set, specifies the estimated number of speakers in the + * conversation. If not set, defaults to '2'. Ignored unless + * enable_speaker_diarization is set to true. + */ + diarizationSpeakerCount?: number; /** * *Optional* If 'true', adds punctuation to recognition result * hypotheses. This feature is only available in select languages. Setting @@ -541,6 +547,22 @@ export namespace videointelligence_v1p1beta1 { * available as a premium feature." */ enableAutomaticPunctuation?: boolean; + /** + * *Optional* If 'true', enables speaker detection for each + * recognized word in the top alternative of the recognition result using a + * speaker_tag provided in the WordInfo. Note: When this is true, we send + * all the words from the beginning of the audio for the top alternative in + * every consecutive responses. This is done in order to improve our speaker + * tags as our models learn to identify the speakers in the conversation + * over time. + */ + enableSpeakerDiarization?: boolean; + /** + * *Optional* If `true`, the top result includes a list of words and the + * confidence for those words. If `false`, no word-level confidence + * information is returned. The default is `false`. + */ + enableWordConfidence?: boolean; /** * *Optional* If set to `true`, the server will attempt to filter out * profanities, replacing all but the initial character in each filtered @@ -694,6 +716,15 @@ export namespace videointelligence_v1p1beta1 { * `enable_word_time_offsets`. */ export interface Schema$GoogleCloudVideointelligenceV1p1beta1_WordInfo { + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. This field is + * not guaranteed to be accurate and users should not rely on it to be + * always provided. The default of 0.0 is a sentinel value indicating + * `confidence` was not set. + */ + confidence?: number; /** * Time offset relative to the beginning of the audio, and corresponding to * the end of the spoken word. This field is only set if @@ -701,6 +732,14 @@ export namespace videointelligence_v1p1beta1 { * an experimental feature and the accuracy of the time offset can vary. */ endTime?: string; + /** + * Output only. A distinct integer value is assigned for every speaker + * within the audio. This field specifies which one of those speakers was + * detected to have spoken this word. Value ranges from 1 up to + * diarization_speaker_count, and is only set if speaker diarization is + * enabled. + */ + speakerTag?: number; /** * Time offset relative to the beginning of the audio, and corresponding to * the start of the spoken word. This field is only set if @@ -713,6 +752,353 @@ export namespace videointelligence_v1p1beta1 { */ word?: string; } + /** + * Video annotation progress. Included in the `metadata` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress { + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + */ + annotationProgress?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress[]; + } + /** + * Video annotation response. Included in the `response` field of the + * `Operation` returned by the `GetOperation` call of the + * `google::longrunning::Operations` service. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse { + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + */ + annotationResults?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults[]; + } + /** + * Detected entity from video analysis. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_Entity { + /** + * Textual description, e.g. `Fixed-gear bicycle`. + */ + description?: string; + /** + * Opaque entity ID. Some IDs may be available in [Google Knowledge Graph + * Search API](https://developers.google.com/knowledge-graph/). + */ + entityId?: string; + /** + * Language code for `description` in BCP-47 format. + */ + languageCode?: string; + } + /** + * Explicit content annotation (based on per-frame visual signals only). If no + * explicit content has been detected in a frame, no annotations are present + * for that frame. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation { + /** + * All video frames where explicit content was detected. + */ + frames?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame[]; + } + /** + * Video frame level annotation results for explicit content. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame { + /** + * Likelihood of the pornography content.. + */ + pornographyLikelihood?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Label annotation. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation { + /** + * Common categories for the detected entity. E.g. when the label is + * `Terrier` the category is likely `dog`. And in some cases there might be + * more than one categories e.g. `Terrier` could also be a `pet`. + */ + categoryEntities?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity[]; + /** + * Detected entity. + */ + entity?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity; + /** + * All video frames where a label was detected. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelFrame[]; + /** + * All video segments where a label was detected. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelSegment[]; + } + /** + * Video frame level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelFrame { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for label detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_LabelSegment { + /** + * Confidence that the label is accurate. Range: [0, 1]. + */ + confidence?: number; + /** + * Video segment where a label was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Normalized bounding box. The normalized vertex coordinates are relative to + * the original image. Range: [0, 1]. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox { + /** + * Bottom Y coordinate. + */ + bottom?: number; + /** + * Left X coordinate. + */ + left?: number; + /** + * Right X coordinate. + */ + right?: number; + /** + * Top Y coordinate. + */ + top?: number; + } + /** + * Normalized bounding polygon for text (that might not be aligned with axis). + * Contains list of the corner points in clockwise order starting from + * top-left corner. For example, for a rectangular bounding box: When the text + * is horizontal it might look like: 0----1 | | 3----2 When + * it's clockwise rotated 180 degrees around the top-left corner it + * becomes: 2----3 | | 1----0 and the vertex order + * will still be (0, 1, 2, 3). Note that values can be less than 0, or greater + * than 1 due to trignometric calculations for location of the box. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly { + /** + * Normalized vertices of the bounding polygon. + */ + vertices?: Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex[]; + } + /** + * A vertex represents a 2D point in the image. NOTE: the normalized vertex + * coordinates are relative to the original image and range from 0 to 1. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex { + /** + * X coordinate. + */ + x?: number; + /** + * Y coordinate. + */ + y?: number; + } + /** + * Annotations corresponding to one tracked object. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation { + /** + * Object category's labeling confidence of this track. + */ + confidence?: number; + /** + * Entity to specify the object category that this track is labeled as. + */ + entity?: Schema$GoogleCloudVideointelligenceV1p2beta1_Entity; + /** + * Information corresponding to all frames where this object track appears. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame[]; + /** + * Each object track corresponds to one video segment where it appears. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Video frame level annotations for object detection and tracking. This field + * stores per frame location, time offset, and confidence. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame { + /** + * The normalized bounding box location of this object track for the frame. + */ + normalizedBoundingBox?: + Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox; + /** + * The timestamp of the frame in microseconds. + */ + timeOffset?: string; + } + /** + * Annotations related to one detected OCR text snippet. This will contain the + * corresponding text, confidence value, and frame level information for each + * detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextAnnotation { + /** + * Confidence for the track of detected text. It is calculated as the + * highest over all frames where OCR detected text appears. + */ + confidence?: number; + /** + * Information related to the frames where OCR detected text appears. + */ + frames?: Schema$GoogleCloudVideointelligenceV1p2beta1_TextFrame[]; + /** + * All video segments where OCR detected text appears. + */ + segments?: Schema$GoogleCloudVideointelligenceV1p2beta1_TextSegment[]; + /** + * The detected text. + */ + text?: string; + } + /** + * Video frame level annotation results for text annotation (OCR). Contains + * information regarding timestamp and bounding box locations for the frames + * containing detected OCR text snippets. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextFrame { + /** + * Bounding polygon of the detected text for this frame. + */ + rotatedBoundingBox?: + Schema$GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly; + /** + * Timestamp of this frame. + */ + timeOffset?: string; + } + /** + * Video segment level annotation results for text detection. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_TextSegment { + /** + * Video segment where a text snippet was detected. + */ + segment?: Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment; + } + /** + * Annotation progress for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress { + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Approximate percentage processed thus far. Guaranteed to be 100 when + * fully processed. + */ + progressPercent?: number; + /** + * Time when the request was received. + */ + startTime?: string; + /** + * Time of the most recent update. + */ + updateTime?: string; + } + /** + * Annotation results for a single video. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults { + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + */ + error?: Schema$GoogleRpc_Status; + /** + * Explicit content annotation. + */ + explicitAnnotation?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation; + /** + * Label annotations on frame level. There is exactly one element for each + * unique label. + */ + frameLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * Video file location in [Google Cloud + * Storage](https://cloud.google.com/storage/). + */ + inputUri?: string; + /** + * Annotations for list of objects detected and tracked in video. + */ + objectAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation[]; + /** + * Label annotations on video level or user specified segment level. There + * is exactly one element for each unique label. + */ + segmentLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * Shot annotations. Each shot is represented as a video segment. + */ + shotAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment[]; + /** + * Label annotations on shot level. There is exactly one element for each + * unique label. + */ + shotLabelAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; + /** + * OCR text detection and tracking. Annotations for list of detected text + * snippets. Each will have list of frame information associated with it. + */ + textAnnotations?: + Schema$GoogleCloudVideointelligenceV1p2beta1_TextAnnotation[]; + } + /** + * Video segment. + */ + export interface Schema$GoogleCloudVideointelligenceV1p2beta1_VideoSegment { + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * end of the segment (inclusive). + */ + endTimeOffset?: string; + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * start of the segment (inclusive). + */ + startTimeOffset?: string; + } /** * Video annotation progress. Included in the `metadata` field of the * `Operation` returned by the `GetOperation` call of the diff --git a/src/apis/vision/v1.ts b/src/apis/vision/v1.ts index ded22349b86..040a63d9742 100644 --- a/src/apis/vision/v1.ts +++ b/src/apis/vision/v1.ts @@ -3031,8 +3031,8 @@ export namespace vision_v1 { name?: string; /** * The category for the product identified by the reference image. This - * should be either "homegoods" or "apparel". This - * field is immutable. + * should be either "homegoods", "apparel", or + * "toys". This field is immutable. */ productCategory?: string; /** diff --git a/src/apis/vision/v1p1beta1.ts b/src/apis/vision/v1p1beta1.ts index 544157bcbf7..0554c830189 100644 --- a/src/apis/vision/v1p1beta1.ts +++ b/src/apis/vision/v1p1beta1.ts @@ -3110,8 +3110,8 @@ export namespace vision_v1p1beta1 { name?: string; /** * The category for the product identified by the reference image. This - * should be either "homegoods" or "apparel". This - * field is immutable. + * should be either "homegoods", "apparel", or + * "toys". This field is immutable. */ productCategory?: string; /** diff --git a/src/apis/vision/v1p2beta1.ts b/src/apis/vision/v1p2beta1.ts index 7113a877db7..48dad15b035 100644 --- a/src/apis/vision/v1p2beta1.ts +++ b/src/apis/vision/v1p2beta1.ts @@ -3110,8 +3110,8 @@ export namespace vision_v1p2beta1 { name?: string; /** * The category for the product identified by the reference image. This - * should be either "homegoods" or "apparel". This - * field is immutable. + * should be either "homegoods", "apparel", or + * "toys". This field is immutable. */ productCategory?: string; /** diff --git a/src/index.ts b/src/index.ts index 375aca28d21..01eaccae0e0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,6 +22,7 @@ export {google, GoogleApis}; export {abusiveexperiencereport_v1} from './apis/abusiveexperiencereport/v1'; export {acceleratedmobilepageurl_v1} from './apis/acceleratedmobilepageurl/v1'; +export {accesscontextmanager_v1beta} from './apis/accesscontextmanager/v1beta'; export {adexchangebuyer_v1_2} from './apis/adexchangebuyer/v1.2'; export {adexchangebuyer_v1_3} from './apis/adexchangebuyer/v1.3'; export {adexchangebuyer_v1_4} from './apis/adexchangebuyer/v1.4'; @@ -32,6 +33,7 @@ export {admin_directory_v1} from './apis/admin/directory_v1'; export {admin_reports_v1} from './apis/admin/reports_v1'; export {adsense_v1_4} from './apis/adsense/v1.4'; export {adsensehost_v4_1} from './apis/adsensehost/v4.1'; +export {alertcenter_v1beta1} from './apis/alertcenter/v1beta1'; export {analytics_v2_4} from './apis/analytics/v2.4'; export {analytics_v3} from './apis/analytics/v3'; export {analyticsreporting_v4} from './apis/analyticsreporting/v4'; @@ -59,6 +61,7 @@ export {calendar_v3} from './apis/calendar/v3'; export {chat_v1} from './apis/chat/v1'; export {civicinfo_v2} from './apis/civicinfo/v2'; export {classroom_v1} from './apis/classroom/v1'; +export {cloudasset_v1beta1} from './apis/cloudasset/v1beta1'; export {cloudbilling_v1} from './apis/cloudbilling/v1'; export {cloudbuild_v1} from './apis/cloudbuild/v1'; export {clouddebugger_v2} from './apis/clouddebugger/v2'; @@ -115,6 +118,7 @@ export {drive_v2} from './apis/drive/v2'; export {drive_v3} from './apis/drive/v3'; export {file_v1beta1} from './apis/file/v1beta1'; export {firebasedynamiclinks_v1} from './apis/firebasedynamiclinks/v1'; +export {firebasehosting_v1beta1} from './apis/firebasehosting/v1beta1'; export {firebaserules_v1} from './apis/firebaserules/v1'; export {firestore_v1} from './apis/firestore/v1'; export {firestore_v1beta1} from './apis/firestore/v1beta1'; @@ -184,6 +188,7 @@ export {servicebroker_v1beta1} from './apis/servicebroker/v1beta1'; export {serviceconsumermanagement_v1} from './apis/serviceconsumermanagement/v1'; export {servicecontrol_v1} from './apis/servicecontrol/v1'; export {servicemanagement_v1} from './apis/servicemanagement/v1'; +export {servicenetworking_v1beta} from './apis/servicenetworking/v1beta'; export {serviceusage_v1} from './apis/serviceusage/v1'; export {serviceusage_v1beta1} from './apis/serviceusage/v1beta1'; export {serviceuser_v1} from './apis/serviceuser/v1';