diff --git a/src/apis/accesscontextmanager/v1beta.ts b/src/apis/accesscontextmanager/v1beta.ts index 82fca4f955..3ec2f848db 100644 --- a/src/apis/accesscontextmanager/v1beta.ts +++ b/src/apis/accesscontextmanager/v1beta.ts @@ -411,13 +411,9 @@ export namespace accesscontextmanager_v1beta { */ unrestrictedServices?: string[] | null; /** - * Beta. Configuration for within Perimeter allowed APIs. + * Beta. Configuration for APIs allowed within Perimeter. */ vpcAccessibleServices?: Schema$VpcAccessibleServices; - /** - * Alpha. Configuration for within Perimeter allowed APIs. Deprecated. The field had been renamed to vpc_accessible_services - */ - vpcServiceRestriction?: Schema$VpcServiceRestriction; } /** * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). @@ -449,19 +445,6 @@ export namespace accesscontextmanager_v1beta { */ enableRestriction?: boolean | null; } - /** - * Alpha. Specifies how APIs are allowed to communicate within the Service Perimeter. This message is DEPRECATED and had been renamed to VpcAccessibleServices - */ - export interface Schema$VpcServiceRestriction { - /** - * The list of APIs usable within the Service Perimeter. Must be empty unless 'enable_restriction' is True. - */ - allowedServices?: string[] | null; - /** - * Whether to restrict API calls within the Service Perimeter to the list of APIs specified in 'allowed_services'. - */ - enableRestriction?: boolean | null; - } export class Resource$Accesspolicies { context: APIRequestContext; diff --git a/src/apis/alertcenter/v1beta1.ts b/src/apis/alertcenter/v1beta1.ts index 8ac301fad6..723447a487 100644 --- a/src/apis/alertcenter/v1beta1.ts +++ b/src/apis/alertcenter/v1beta1.ts @@ -163,7 +163,7 @@ export namespace alertcenter_v1beta1 { */ supersededAlerts?: string[] | null; /** - * Alert id superseding this alert. It is used to indicate that superseding alert is essentially extension of this alert and we found the relationship after creating both alerts. + * Alert ID superseding this alert. It is used to indicate that superseding alert is essentially extension of this alert and we found the relationship after creating both alerts. */ supersedingAlert?: string | null; /** @@ -346,7 +346,7 @@ export namespace alertcenter_v1beta1 { */ export interface Schema$BatchDeleteAlertsRequest { /** - * Required. list of alert ids. + * Required. list of alert IDs. */ alertId?: string[] | null; /** @@ -363,7 +363,7 @@ export namespace alertcenter_v1beta1 { */ failedAlertStatus?: {[key: string]: Schema$Status} | null; /** - * The successful list of alert ids. + * The successful list of alert IDs. */ successAlertIds?: string[] | null; } @@ -372,7 +372,7 @@ export namespace alertcenter_v1beta1 { */ export interface Schema$BatchUndeleteAlertsRequest { /** - * Required. list of alert ids. + * Required. list of alert IDs. */ alertId?: string[] | null; /** @@ -389,7 +389,7 @@ export namespace alertcenter_v1beta1 { */ failedAlertStatus?: {[key: string]: Schema$Status} | null; /** - * The successful list of alert ids. + * The successful list of alert IDs. */ successAlertIds?: string[] | null; } @@ -505,40 +505,6 @@ export namespace alertcenter_v1beta1 { */ takeoutRequestId?: string | null; } - /** - * A Drive file - */ - export interface Schema$DriveFile { - /** - * Abuse type of the file. - */ - abuseType?: string | null; - /** - * The ID of the file. - */ - id?: string | null; - /** - * The name of the file. - */ - name?: string | null; - /** - * The number of recent downloads of the file. This is available for the following alert types: *Drive malware sharing detected - */ - numRecentDownload?: string | null; - /** - * The email address of the file owner. - */ - owner?: string | null; - } - /** - * Alerts for suspicious Drive files or activities. - */ - export interface Schema$DriveFileWarning { - /** - * List of files in the alert. - */ - files?: Schema$DriveFile[]; - } /** * 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 `{}`. */ @@ -632,7 +598,7 @@ export namespace alertcenter_v1beta1 { */ ipAddress?: string | null; /** - * Optional. The successful login time that is associated with the warning event. This will not be present for blocked login attempts. + * Optional. The successful login time that is associated with the warning event. This isn't present for blocked login attempts. */ loginTime?: string | null; } @@ -756,7 +722,7 @@ export namespace alertcenter_v1beta1 { */ documentId?: string | null; /** - * Title of the resource, e.g. email subject, or document title. + * Title of the resource, for example email subject, or document title. */ resourceTitle?: string | null; } diff --git a/src/apis/bigquery/v2.ts b/src/apis/bigquery/v2.ts index e009de7a4d..4423a39319 100644 --- a/src/apis/bigquery/v2.ts +++ b/src/apis/bigquery/v2.ts @@ -416,15 +416,15 @@ export namespace bigquery_v2 { * [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run. */ trainingOptions?: { - l1Reg?: number; - maxIteration?: string; learnRate?: number; minRelProgress?: number; l2Reg?: number; - warmStart?: boolean; learnRateStrategy?: string; + warmStart?: boolean; lineSearchInitLearnRate?: number; earlyStop?: boolean; + l1Reg?: number; + maxIteration?: string; } | null; } /** @@ -550,13 +550,13 @@ export namespace bigquery_v2 { * [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; */ access?: Array<{ - view?: Schema$TableReference; - groupByEmail?: string; userByEmail?: string; domain?: string; iamMember?: string; specialGroup?: string; role?: string; + view?: Schema$TableReference; + groupByEmail?: string; }> | null; /** * [Output-only] The time when this dataset was created, in milliseconds since the epoch. @@ -617,12 +617,12 @@ export namespace bigquery_v2 { * An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, use the Datasets: get method. This property is omitted when there are no datasets in the project. */ datasets?: Array<{ + labels?: {[key: string]: string}; + datasetReference?: Schema$DatasetReference; id?: string; location?: string; friendlyName?: string; kind?: string; - labels?: {[key: string]: string}; - datasetReference?: Schema$DatasetReference; }> | null; /** * A hash value of the results page. You can use this property to determine if the page has changed since the last request. @@ -1400,15 +1400,15 @@ export namespace bigquery_v2 { * List of jobs that were requested. */ jobs?: Array<{ + id?: string; configuration?: Schema$JobConfiguration; user_email?: string; - errorResult?: Schema$ErrorProto; kind?: string; + errorResult?: Schema$ErrorProto; jobReference?: Schema$JobReference; status?: Schema$JobStatus; state?: string; statistics?: Schema$JobStatistics; - id?: string; }> | null; /** * The resource type of the response. @@ -1473,7 +1473,7 @@ export namespace bigquery_v2 { /** * [Output-only] Job resource usage breakdown by reservation. */ - reservationUsage?: Array<{name?: string; slotMs?: string}> | null; + reservationUsage?: Array<{slotMs?: string; name?: string}> | null; /** * [Output-only] Name of the primary reservation assigned to this job. Note that this could be different than reservations reported in the reservation usage field if parent reservations were used to execute this job. */ @@ -1551,7 +1551,7 @@ export namespace bigquery_v2 { /** * [Output-only] Job resource usage breakdown by reservation. */ - reservationUsage?: Array<{slotMs?: string; name?: string}> | null; + reservationUsage?: Array<{name?: string; slotMs?: string}> | null; /** * [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries. */ @@ -1843,9 +1843,9 @@ export namespace bigquery_v2 { * [Optional] The types of the fields of this struct, in order, if this is a struct. */ structTypes?: Array<{ - type?: Schema$QueryParameterType; name?: string; description?: string; + type?: Schema$QueryParameterType; }> | null; /** * [Required] The top level type of this field. @@ -2393,8 +2393,8 @@ export namespace bigquery_v2 { * Tables in the requested dataset. */ tables?: Array<{ - clustering?: Schema$Clustering; type?: string; + clustering?: Schema$Clustering; expirationTime?: string; kind?: string; view?: {useLegacySql?: boolean}; diff --git a/src/apis/bigqueryreservation/v1beta1.ts b/src/apis/bigqueryreservation/v1beta1.ts index f90e82dcdb..91c50b8e59 100644 --- a/src/apis/bigqueryreservation/v1beta1.ts +++ b/src/apis/bigqueryreservation/v1beta1.ts @@ -154,11 +154,11 @@ export namespace bigqueryreservation_v1beta1 { updateTime?: string | null; } /** - * Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some minimum committed period of usage. Capacity commitment is immutable and cannot be deleted until the end of the commitment period. After the end of the commitment period, slots are still available but can be freely removed any time. Annual commitments will automatically be downgraded to monthly after the commitment ends. A capacity commitment resource exists as a child resource of the admin project. + * Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Monthly and annual commitments renew by default. Only flex commitments can be removed. In order to remove monthly or annual commitments, their plan needs to be changed to flex first. A capacity commitment resource exists as a child resource of the admin project. */ export interface Schema$CapacityCommitment { /** - * Output only. The end of the commitment period. Capacity commitment cannot be removed before commitment_end_time. It is applicable only for ACTIVE capacity commitments and is computed as a combination of the plan and the time when the capacity commitment became ACTIVE. + * Output only. The end of the current commitment period. It is applicable only for ACTIVE capacity commitments. */ commitmentEndTime?: string | null; /** @@ -173,6 +173,10 @@ export namespace bigqueryreservation_v1beta1 { * Capacity commitment commitment plan. */ plan?: string | null; + /** + * The plan this capacity commitment is converted to after commitment_end_time passes. Once the plan is changed, committed period is extended according to commitment plan. Only applicable for MONTHLY and ANNUAL commitments. + */ + renewalPlan?: string | null; /** * Number of slots in this commitment. */ @@ -225,6 +229,15 @@ export namespace bigqueryreservation_v1beta1 { */ reservations?: Schema$Reservation[]; } + /** + * The request for ReservationService.MergeCapacityCommitments. + */ + export interface Schema$MergeCapacityCommitmentsRequest { + /** + * Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. + */ + capacityCommitmentIds?: string[] | null; + } /** * The request for ReservationService.MoveAssignment. Note: "bigquery.reservationAssignments.create" permission is required on the destination_id. Note: "bigquery.reservationAssignments.create" and "bigquery.reservationAssignments.delete" permission is required on the related assignee. */ @@ -264,6 +277,28 @@ export namespace bigqueryreservation_v1beta1 { */ nextPageToken?: string | null; } + /** + * The request for ReservationService.SplitCapacityCommitment. + */ + export interface Schema$SplitCapacityCommitmentRequest { + /** + * Number of slots in the capacity commitment after the split. + */ + slotCount?: string | null; + } + /** + * The response for ReservationService.SplitCapacityCommitment. + */ + export interface Schema$SplitCapacityCommitmentResponse { + /** + * First capacity commitment, result of a split. + */ + first?: Schema$CapacityCommitment; + /** + * Second capacity commitment, result of a split. + */ + second?: Schema$CapacityCommitment; + } /** * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ @@ -281,6 +316,15 @@ export namespace bigqueryreservation_v1beta1 { */ message?: string | null; } + /** + * The request for ReservationService.UpgradeCapacityCommitmentPlan. + */ + export interface Schema$UpgradeCapacityCommitmentPlanRequest { + /** + * New capacity commitment plan. + */ + plan?: string | null; + } export class Resource$Projects { context: APIRequestContext; @@ -909,6 +953,318 @@ export namespace bigqueryreservation_v1beta1 { ); } } + + /** + * bigqueryreservation.projects.locations.capacityCommitments.merge + * @desc Merges capacity commitments of the same plan into one. Resulting capacity commitment has the longer commitment_end_time out of the two. Attempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + * @alias bigqueryreservation.projects.locations.capacityCommitments.merge + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Parent resource that identifies admin project and location e.g., projects/myproject/locations/us + * @param {().MergeCapacityCommitmentsRequest} params.requestBody 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 + */ + merge( + params?: Params$Resource$Projects$Locations$Capacitycommitments$Merge, + options?: MethodOptions + ): GaxiosPromise; + merge( + params: Params$Resource$Projects$Locations$Capacitycommitments$Merge, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + merge( + params: Params$Resource$Projects$Locations$Capacitycommitments$Merge, + callback: BodyResponseCallback + ): void; + merge(callback: BodyResponseCallback): void; + merge( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Capacitycommitments$Merge + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Capacitycommitments$Merge; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Capacitycommitments$Merge; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigqueryreservation.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1beta1/{+parent}/capacityCommitments:merge' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * bigqueryreservation.projects.locations.capacityCommitments.patch + * @desc Updates an existing capacity commitment. Only renewal_plan field can be updated. + * @alias bigqueryreservation.projects.locations.capacityCommitments.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123 + * @param {string=} params.updateMask Standard field mask for the set of fields to be updated. + * @param {().CapacityCommitment} params.requestBody 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$Locations$Capacitycommitments$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Capacitycommitments$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Capacitycommitments$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Capacitycommitments$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Capacitycommitments$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Capacitycommitments$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigqueryreservation.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * bigqueryreservation.projects.locations.capacityCommitments.split + * @desc Splits capacity commitment to two commitments of the same plan and commitment_end_time. A common use case to do that is to perform a downgrade e.g., in order to downgrade from 10000 slots to 8000, one might split 10000 capacity commitment to 2000 and 8000, change the plan of the first one to flex and then delete it. + * @alias bigqueryreservation.projects.locations.capacityCommitments.split + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123 + * @param {().SplitCapacityCommitmentRequest} params.requestBody 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 + */ + split( + params?: Params$Resource$Projects$Locations$Capacitycommitments$Split, + options?: MethodOptions + ): GaxiosPromise; + split( + params: Params$Resource$Projects$Locations$Capacitycommitments$Split, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + split( + params: Params$Resource$Projects$Locations$Capacitycommitments$Split, + callback: BodyResponseCallback + ): void; + split( + callback: BodyResponseCallback + ): void; + split( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Capacitycommitments$Split + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Capacitycommitments$Split; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Capacitycommitments$Split; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigqueryreservation.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:split').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * bigqueryreservation.projects.locations.capacityCommitments.upgradeCapacityCommitmentPlan + * @desc Replaces an existing commitment with a new commitment of a different plan. Plan can only be changed to a plan of a longer commitment period. New commitment start is set to a current time. Attempting to change to a plan with shorter commitment period will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + * @alias bigqueryreservation.projects.locations.capacityCommitments.upgradeCapacityCommitmentPlan + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.capacityCommitment Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123 + * @param {().UpgradeCapacityCommitmentPlanRequest} params.requestBody 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 + */ + upgradeCapacityCommitmentPlan( + params?: Params$Resource$Projects$Locations$Capacitycommitments$Upgradecapacitycommitmentplan, + options?: MethodOptions + ): GaxiosPromise; + upgradeCapacityCommitmentPlan( + params: Params$Resource$Projects$Locations$Capacitycommitments$Upgradecapacitycommitmentplan, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + upgradeCapacityCommitmentPlan( + params: Params$Resource$Projects$Locations$Capacitycommitments$Upgradecapacitycommitmentplan, + callback: BodyResponseCallback + ): void; + upgradeCapacityCommitmentPlan( + callback: BodyResponseCallback + ): void; + upgradeCapacityCommitmentPlan( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Capacitycommitments$Upgradecapacitycommitmentplan + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Capacitycommitments$Upgradecapacitycommitmentplan; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Capacitycommitments$Upgradecapacitycommitmentplan; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigqueryreservation.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1beta1/{+capacityCommitment}:upgradeCapacityCommitmentPlan' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['capacityCommitment'], + pathParams: ['capacityCommitment'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Capacitycommitments$Create @@ -976,6 +1332,78 @@ export namespace bigqueryreservation_v1beta1 { */ parent?: string; } + export interface Params$Resource$Projects$Locations$Capacitycommitments$Merge + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Parent resource that identifies admin project and location e.g., projects/myproject/locations/us + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$MergeCapacityCommitmentsRequest; + } + export interface Params$Resource$Projects$Locations$Capacitycommitments$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Output only. The resource name of the capacity commitment, e.g., projects/myproject/locations/US/capacityCommitments/123 + */ + name?: string; + /** + * Standard field mask for the set of fields to be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CapacityCommitment; + } + export interface Params$Resource$Projects$Locations$Capacitycommitments$Split + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123 + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SplitCapacityCommitmentRequest; + } + export interface Params$Resource$Projects$Locations$Capacitycommitments$Upgradecapacitycommitmentplan + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource name e.g.,: projects/myproject/locations/US/capacityCommitments/123 + */ + capacityCommitment?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UpgradeCapacityCommitmentPlanRequest; + } export class Resource$Projects$Locations$Reservations { context: APIRequestContext; diff --git a/src/apis/bigtableadmin/v1.ts b/src/apis/bigtableadmin/v1.ts index a4904f58ac..d206d0cfb5 100644 --- a/src/apis/bigtableadmin/v1.ts +++ b/src/apis/bigtableadmin/v1.ts @@ -121,15 +121,15 @@ export namespace bigtableadmin_v1 { */ defaultStorageType?: string | null; /** - * (`CreationOnly`) The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/<project>/locations/<zone>`. + * (`CreationOnly`) The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/{project}/locations/{zone}`. */ location?: string | null; /** - * (`OutputOnly`) The unique name of the cluster. Values are of the form `projects/<project>/instances/<instance>/clusters/a-z*`. + * Required. (`OutputOnly`) The unique name of the cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/a-z*`. */ name?: string | null; /** - * The number of nodes allocated to this cluster. More nodes enable higher throughput and more consistent performance. + * Required. The number of nodes allocated to this cluster. More nodes enable higher throughput and more consistent performance. */ serveNodes?: number | null; /** @@ -163,15 +163,15 @@ export namespace bigtableadmin_v1 { */ export interface Schema$CreateClusterRequest { /** - * The cluster to be created. Fields marked `OutputOnly` must be left blank. + * Required. The cluster to be created. Fields marked `OutputOnly` must be left blank. */ cluster?: Schema$Cluster; /** - * The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. + * Required. The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. */ clusterId?: string | null; /** - * The unique name of the instance in which to create the new cluster. Values are of the form `projects/<project>/instances/<instance>`. + * Required. The unique name of the instance in which to create the new cluster. Values are of the form `projects/{project}/instances/{instance}`. */ parent?: string | null; } @@ -197,19 +197,19 @@ export namespace bigtableadmin_v1 { */ export interface Schema$CreateInstanceRequest { /** - * The clusters to be created within the instance, mapped by desired cluster ID, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` must be left blank. Currently, at most four clusters can be specified. + * Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` must be left blank. Currently, at most four clusters can be specified. */ clusters?: {[key: string]: Schema$Cluster} | null; /** - * The instance to create. Fields marked `OutputOnly` must be left blank. + * Required. The instance to create. Fields marked `OutputOnly` must be left blank. */ instance?: Schema$Instance; /** - * The ID to be used when referring to the new instance within its project, e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`. + * Required. The ID to be used when referring to the new instance within its project, e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`. */ instanceId?: string | null; /** - * The unique name of the project in which to create the new instance. Values are of the form `projects/<project>`. + * Required. The unique name of the project in which to create the new instance. Values are of the form `projects/{project}`. */ parent?: string | null; } @@ -218,15 +218,15 @@ export namespace bigtableadmin_v1 { */ export interface Schema$Instance { /** - * The descriptive name for this instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. + * Required. The descriptive name for this instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. */ displayName?: string | null; /** - * Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. They can be used to filter resources and aggregate metrics. * Label keys must be between 1 and 63 characters long and must conform to the regular expression: `\p{Ll}\p{Lo}{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * No more than 64 labels can be associated with a given resource. * Keys and values must both be under 128 bytes. + * Required. Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. They can be used to filter resources and aggregate metrics. * Label keys must be between 1 and 63 characters long and must conform to the regular expression: `\p{Ll}\p{Lo}{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * No more than 64 labels can be associated with a given resource. * Keys and values must both be under 128 bytes. */ labels?: {[key: string]: string} | null; /** - * (`OutputOnly`) The unique name of the instance. Values are of the form `projects/<project>/instances/a-z+[a-z0-9]`. + * Required. (`OutputOnly`) The unique name of the instance. Values are of the form `projects/{project}/instances/a-z+[a-z0-9]`. */ name?: string | null; /** @@ -234,7 +234,7 @@ export namespace bigtableadmin_v1 { */ state?: string | null; /** - * The type of the instance. Defaults to `PRODUCTION`. + * Required. The type of the instance. Defaults to `PRODUCTION`. */ type?: string | null; } @@ -243,11 +243,11 @@ export namespace bigtableadmin_v1 { */ export interface Schema$PartialUpdateInstanceRequest { /** - * The Instance which will (partially) replace the current value. + * Required. The Instance which will (partially) replace the current value. */ instance?: Schema$Instance; /** - * The subset of Instance fields which should be replaced. Must be explicitly set. + * Required. The subset of Instance fields which should be replaced. Must be explicitly set. */ updateMask?: string | null; } diff --git a/src/apis/bigtableadmin/v2.ts b/src/apis/bigtableadmin/v2.ts index d83ba67852..3ea81969d5 100644 --- a/src/apis/bigtableadmin/v2.ts +++ b/src/apis/bigtableadmin/v2.ts @@ -190,7 +190,7 @@ export namespace bigtableadmin_v2 { */ export interface Schema$CheckConsistencyRequest { /** - * The token created using GenerateConsistencyToken for the Table. + * Required. The token created using GenerateConsistencyToken for the Table. */ consistencyToken?: string | null; } @@ -212,15 +212,15 @@ export namespace bigtableadmin_v2 { */ defaultStorageType?: string | null; /** - * (`CreationOnly`) The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/<project>/locations/<zone>`. + * (`CreationOnly`) The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/{project}/locations/{zone}`. */ location?: string | null; /** - * (`OutputOnly`) The unique name of the cluster. Values are of the form `projects/<project>/instances/<instance>/clusters/a-z*`. + * Required. (`OutputOnly`) The unique name of the cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/a-z*`. */ name?: string | null; /** - * The number of nodes allocated to this cluster. More nodes enable higher throughput and more consistent performance. + * Required. The number of nodes allocated to this cluster. More nodes enable higher throughput and more consistent performance. */ serveNodes?: number | null; /** @@ -272,15 +272,15 @@ export namespace bigtableadmin_v2 { */ export interface Schema$CreateClusterRequest { /** - * The cluster to be created. Fields marked `OutputOnly` must be left blank. + * Required. The cluster to be created. Fields marked `OutputOnly` must be left blank. */ cluster?: Schema$Cluster; /** - * The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. + * Required. The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. */ clusterId?: string | null; /** - * The unique name of the instance in which to create the new cluster. Values are of the form `projects/<project>/instances/<instance>`. + * Required. The unique name of the instance in which to create the new cluster. Values are of the form `projects/{project}/instances/{instance}`. */ parent?: string | null; } @@ -306,19 +306,19 @@ export namespace bigtableadmin_v2 { */ export interface Schema$CreateInstanceRequest { /** - * The clusters to be created within the instance, mapped by desired cluster ID, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` must be left blank. Currently, at most four clusters can be specified. + * Required. The clusters to be created within the instance, mapped by desired cluster ID, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` must be left blank. Currently, at most four clusters can be specified. */ clusters?: {[key: string]: Schema$Cluster} | null; /** - * The instance to create. Fields marked `OutputOnly` must be left blank. + * Required. The instance to create. Fields marked `OutputOnly` must be left blank. */ instance?: Schema$Instance; /** - * The ID to be used when referring to the new instance within its project, e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`. + * Required. The ID to be used when referring to the new instance within its project, e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`. */ instanceId?: string | null; /** - * The unique name of the project in which to create the new instance. Values are of the form `projects/<project>`. + * Required. The unique name of the project in which to create the new instance. Values are of the form `projects/{project}`. */ parent?: string | null; } @@ -331,11 +331,11 @@ export namespace bigtableadmin_v2 { */ initialSplits?: Schema$Split[]; /** - * The Table to create. + * Required. The Table to create. */ table?: Schema$Table; /** - * The name by which the new table should be referred to within the parent instance, e.g., `foobar` rather than `<parent>/tables/foobar`. Maximum 50 characters. + * Required. The name by which the new table should be referred to within the parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. Maximum 50 characters. */ tableId?: string | null; } @@ -434,15 +434,15 @@ export namespace bigtableadmin_v2 { */ export interface Schema$Instance { /** - * The descriptive name for this instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. + * Required. The descriptive name for this instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. */ displayName?: string | null; /** - * Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. They can be used to filter resources and aggregate metrics. * Label keys must be between 1 and 63 characters long and must conform to the regular expression: `\p{Ll}\p{Lo}{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * No more than 64 labels can be associated with a given resource. * Keys and values must both be under 128 bytes. + * Required. Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. They can be used to filter resources and aggregate metrics. * Label keys must be between 1 and 63 characters long and must conform to the regular expression: `\p{Ll}\p{Lo}{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * No more than 64 labels can be associated with a given resource. * Keys and values must both be under 128 bytes. */ labels?: {[key: string]: string} | null; /** - * (`OutputOnly`) The unique name of the instance. Values are of the form `projects/<project>/instances/a-z+[a-z0-9]`. + * Required. (`OutputOnly`) The unique name of the instance. Values are of the form `projects/{project}/instances/a-z+[a-z0-9]`. */ name?: string | null; /** @@ -450,7 +450,7 @@ export namespace bigtableadmin_v2 { */ state?: string | null; /** - * The type of the instance. Defaults to `PRODUCTION`. + * Required. The type of the instance. Defaults to `PRODUCTION`. */ type?: string | null; } @@ -604,7 +604,7 @@ export namespace bigtableadmin_v2 { */ export interface Schema$ModifyColumnFamiliesRequest { /** - * Modifications to be atomically applied to the specified table's families. Entries are applied in order, meaning that earlier modifications can be masked by later ones (in the case of repeated updates to the same family, for example). + * Required. Modifications to be atomically applied to the specified table's families. Entries are applied in order, meaning that earlier modifications can be masked by later ones (in the case of repeated updates to the same family, for example). */ modifications?: Schema$Modification[]; } @@ -642,11 +642,11 @@ export namespace bigtableadmin_v2 { */ export interface Schema$PartialUpdateInstanceRequest { /** - * The Instance which will (partially) replace the current value. + * Required. The Instance which will (partially) replace the current value. */ instance?: Schema$Instance; /** - * The subset of Instance fields which should be replaced. Must be explicitly set. + * Required. The subset of Instance fields which should be replaced. Must be explicitly set. */ updateMask?: string | null; } @@ -1235,7 +1235,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent The unique name of the project in which to create the new instance. Values are of the form `projects/`. + * @param {string} params.parent Required. The unique name of the project in which to create the new instance. Values are of the form `projects/{project}`. * @param {().CreateInstanceRequest} params.requestBody 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. @@ -1311,7 +1311,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the instance to be deleted. Values are of the form `projects//instances/`. + * @param {string} params.name Required. The unique name of the instance to be deleted. Values are of the form `projects/{project}/instances/{instance}`. * @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 @@ -1381,7 +1381,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the requested instance. Values are of the form `projects//instances/`. + * @param {string} params.name Required. The unique name of the requested instance. Values are of the form `projects/{project}/instances/{instance}`. * @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 @@ -1526,7 +1526,7 @@ export namespace bigtableadmin_v2 { * * @param {object} params Parameters for request * @param {string=} params.pageToken DEPRECATED: This field is unused and ignored. - * @param {string} params.parent The unique name of the project for which a list of instances is requested. Values are of the form `projects/`. + * @param {string} params.parent Required. The unique name of the project for which a list of instances is requested. Values are of the form `projects/{project}`. * @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 @@ -1603,8 +1603,8 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name (`OutputOnly`) The unique name of the instance. Values are of the form `projects//instances/a-z+[a-z0-9]`. - * @param {string=} params.updateMask The subset of Instance fields which should be replaced. Must be explicitly set. + * @param {string} params.name Required. (`OutputOnly`) The unique name of the instance. Values are of the form `projects/{project}/instances/a-z+[a-z0-9]`. + * @param {string=} params.updateMask Required. The subset of Instance fields which should be replaced. Must be explicitly set. * @param {().Instance} params.requestBody 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. @@ -1836,7 +1836,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name (`OutputOnly`) The unique name of the instance. Values are of the form `projects//instances/a-z+[a-z0-9]`. + * @param {string} params.name Required. (`OutputOnly`) The unique name of the instance. Values are of the form `projects/{project}/instances/a-z+[a-z0-9]`. * @param {().Instance} params.requestBody 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. @@ -1909,7 +1909,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the project in which to create the new instance. Values are of the form `projects/`. + * Required. The unique name of the project in which to create the new instance. Values are of the form `projects/{project}`. */ parent?: string; @@ -1926,7 +1926,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the instance to be deleted. Values are of the form `projects//instances/`. + * Required. The unique name of the instance to be deleted. Values are of the form `projects/{project}/instances/{instance}`. */ name?: string; } @@ -1938,7 +1938,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the requested instance. Values are of the form `projects//instances/`. + * Required. The unique name of the requested instance. Values are of the form `projects/{project}/instances/{instance}`. */ name?: string; } @@ -1971,7 +1971,7 @@ export namespace bigtableadmin_v2 { */ pageToken?: string; /** - * The unique name of the project for which a list of instances is requested. Values are of the form `projects/`. + * Required. The unique name of the project for which a list of instances is requested. Values are of the form `projects/{project}`. */ parent?: string; } @@ -1983,11 +1983,11 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * (`OutputOnly`) The unique name of the instance. Values are of the form `projects//instances/a-z+[a-z0-9]`. + * Required. (`OutputOnly`) The unique name of the instance. Values are of the form `projects/{project}/instances/a-z+[a-z0-9]`. */ name?: string; /** - * The subset of Instance fields which should be replaced. Must be explicitly set. + * Required. The subset of Instance fields which should be replaced. Must be explicitly set. */ updateMask?: string; @@ -2038,7 +2038,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * (`OutputOnly`) The unique name of the instance. Values are of the form `projects//instances/a-z+[a-z0-9]`. + * Required. (`OutputOnly`) The unique name of the instance. Values are of the form `projects/{project}/instances/a-z+[a-z0-9]`. */ name?: string; @@ -2061,9 +2061,9 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.appProfileId The ID to be used when referring to the new app profile within its instance, e.g., just `myprofile` rather than `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * @param {string=} params.appProfileId Required. The ID to be used when referring to the new app profile within its instance, e.g., just `myprofile` rather than `projects/myproject/instances/myinstance/appProfiles/myprofile`. * @param {boolean=} params.ignoreWarnings If true, ignore safety checks when creating the app profile. - * @param {string} params.parent The unique name of the instance in which to create the new app profile. Values are of the form `projects//instances/`. + * @param {string} params.parent Required. The unique name of the instance in which to create the new app profile. Values are of the form `projects/{project}/instances/{instance}`. * @param {().AppProfile} params.requestBody 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. @@ -2139,8 +2139,8 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {boolean=} params.ignoreWarnings If true, ignore safety checks when deleting the app profile. - * @param {string} params.name The unique name of the app profile to be deleted. Values are of the form `projects//instances//appProfiles/`. + * @param {boolean=} params.ignoreWarnings Required. If true, ignore safety checks when deleting the app profile. + * @param {string} params.name Required. The unique name of the app profile to be deleted. Values are of the form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. * @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 @@ -2210,7 +2210,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the requested app profile. Values are of the form `projects//instances//appProfiles/`. + * @param {string} params.name Required. The unique name of the requested app profile. Values are of the form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. * @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 @@ -2284,7 +2284,7 @@ export namespace bigtableadmin_v2 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Maximum number of results per page. A page_size of zero lets the server choose the number of items to return. A page_size which is strictly positive will return at most that many items. A negative page_size will cause an error. Following the first request, subsequent paginated calls are not required to pass a page_size. If a page_size is set in subsequent calls, it must match the page_size given in the first request. * @param {string=} params.pageToken The value of `next_page_token` returned by a previous call. - * @param {string} params.parent The unique name of the instance for which a list of app profiles is requested. Values are of the form `projects//instances/`. Use ` = '-'` to list AppProfiles for all Instances in a project, e.g., `projects/myproject/instances/-`. + * @param {string} params.parent Required. The unique name of the instance for which a list of app profiles is requested. Values are of the form `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list AppProfiles for all Instances in a project, e.g., `projects/myproject/instances/-`. * @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 @@ -2363,7 +2363,7 @@ export namespace bigtableadmin_v2 { * @param {object} params Parameters for request * @param {boolean=} params.ignoreWarnings If true, ignore safety checks when updating the app profile. * @param {string} params.name (`OutputOnly`) The unique name of the app profile. Values are of the form `projects//instances//appProfiles/_a-zA-Z0-9*`. - * @param {string=} params.updateMask The subset of app profile fields which should be replaced. If unset, all fields will be replaced. + * @param {string=} params.updateMask Required. The subset of app profile fields which should be replaced. If unset, all fields will be replaced. * @param {().AppProfile} params.requestBody 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. @@ -2438,7 +2438,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The ID to be used when referring to the new app profile within its instance, e.g., just `myprofile` rather than `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * Required. The ID to be used when referring to the new app profile within its instance, e.g., just `myprofile` rather than `projects/myproject/instances/myinstance/appProfiles/myprofile`. */ appProfileId?: string; /** @@ -2446,7 +2446,7 @@ export namespace bigtableadmin_v2 { */ ignoreWarnings?: boolean; /** - * The unique name of the instance in which to create the new app profile. Values are of the form `projects//instances/`. + * Required. The unique name of the instance in which to create the new app profile. Values are of the form `projects/{project}/instances/{instance}`. */ parent?: string; @@ -2463,11 +2463,11 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * If true, ignore safety checks when deleting the app profile. + * Required. If true, ignore safety checks when deleting the app profile. */ ignoreWarnings?: boolean; /** - * The unique name of the app profile to be deleted. Values are of the form `projects//instances//appProfiles/`. + * Required. The unique name of the app profile to be deleted. Values are of the form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. */ name?: string; } @@ -2479,7 +2479,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the requested app profile. Values are of the form `projects//instances//appProfiles/`. + * Required. The unique name of the requested app profile. Values are of the form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. */ name?: string; } @@ -2499,7 +2499,7 @@ export namespace bigtableadmin_v2 { */ pageToken?: string; /** - * The unique name of the instance for which a list of app profiles is requested. Values are of the form `projects//instances/`. Use ` = '-'` to list AppProfiles for all Instances in a project, e.g., `projects/myproject/instances/-`. + * Required. The unique name of the instance for which a list of app profiles is requested. Values are of the form `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list AppProfiles for all Instances in a project, e.g., `projects/myproject/instances/-`. */ parent?: string; } @@ -2519,7 +2519,7 @@ export namespace bigtableadmin_v2 { */ name?: string; /** - * The subset of app profile fields which should be replaced. If unset, all fields will be replaced. + * Required. The subset of app profile fields which should be replaced. If unset, all fields will be replaced. */ updateMask?: string; @@ -2546,8 +2546,8 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.clusterId The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. - * @param {string} params.parent The unique name of the instance in which to create the new cluster. Values are of the form `projects//instances/`. + * @param {string=} params.clusterId Required. The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. + * @param {string} params.parent Required. The unique name of the instance in which to create the new cluster. Values are of the form `projects/{project}/instances/{instance}`. * @param {().Cluster} params.requestBody 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. @@ -2623,7 +2623,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the cluster to be deleted. Values are of the form `projects//instances//clusters/`. + * @param {string} params.name Required. The unique name of the cluster to be deleted. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. * @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 @@ -2693,7 +2693,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the requested cluster. Values are of the form `projects//instances//clusters/`. + * @param {string} params.name Required. The unique name of the requested cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. * @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 @@ -2764,7 +2764,7 @@ export namespace bigtableadmin_v2 { * * @param {object} params Parameters for request * @param {string=} params.pageToken DEPRECATED: This field is unused and ignored. - * @param {string} params.parent The unique name of the instance for which a list of clusters is requested. Values are of the form `projects//instances/`. Use ` = '-'` to list Clusters for all Instances in a project, e.g., `projects/myproject/instances/-`. + * @param {string} params.parent Required. The unique name of the instance for which a list of clusters is requested. Values are of the form `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list Clusters for all Instances in a project, e.g., `projects/myproject/instances/-`. * @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 @@ -2841,7 +2841,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name (`OutputOnly`) The unique name of the cluster. Values are of the form `projects//instances//clusters/a-z*`. + * @param {string} params.name Required. (`OutputOnly`) The unique name of the cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/a-z*`. * @param {().Cluster} params.requestBody 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. @@ -2916,11 +2916,11 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. + * Required. The ID to be used when referring to the new cluster within its instance, e.g., just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`. */ clusterId?: string; /** - * The unique name of the instance in which to create the new cluster. Values are of the form `projects//instances/`. + * Required. The unique name of the instance in which to create the new cluster. Values are of the form `projects/{project}/instances/{instance}`. */ parent?: string; @@ -2937,7 +2937,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the cluster to be deleted. Values are of the form `projects//instances//clusters/`. + * Required. The unique name of the cluster to be deleted. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. */ name?: string; } @@ -2949,7 +2949,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the requested cluster. Values are of the form `projects//instances//clusters/`. + * Required. The unique name of the requested cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. */ name?: string; } @@ -2965,7 +2965,7 @@ export namespace bigtableadmin_v2 { */ pageToken?: string; /** - * The unique name of the instance for which a list of clusters is requested. Values are of the form `projects//instances/`. Use ` = '-'` to list Clusters for all Instances in a project, e.g., `projects/myproject/instances/-`. + * Required. The unique name of the instance for which a list of clusters is requested. Values are of the form `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list Clusters for all Instances in a project, e.g., `projects/myproject/instances/-`. */ parent?: string; } @@ -2977,7 +2977,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * (`OutputOnly`) The unique name of the cluster. Values are of the form `projects//instances//clusters/a-z*`. + * Required. (`OutputOnly`) The unique name of the cluster. Values are of the form `projects/{project}/instances/{instance}/clusters/a-z*`. */ name?: string; @@ -3140,6 +3140,89 @@ export namespace bigtableadmin_v2 { return createAPIRequest(parameters); } } + + /** + * bigtableadmin.projects.instances.clusters.backups.testIamPermissions + * @desc Returns permissions that the caller has on the specified table resource. + * @alias bigtableadmin.projects.instances.clusters.backups.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.requestBody 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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Instances$Clusters$Backups$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Instances$Clusters$Backups$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Instances$Clusters$Backups$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Clusters$Backups$Testiampermissions + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Clusters$Backups$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Clusters$Backups$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://bigtableadmin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Instances$Clusters$Backups$Getiampolicy @@ -3176,6 +3259,23 @@ export namespace bigtableadmin_v2 { */ requestBody?: Schema$SetIamPolicyRequest; } + export interface Params$Resource$Projects$Instances$Clusters$Backups$Testiampermissions + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } export class Resource$Projects$Instances$Tables { context: APIRequestContext; @@ -3190,7 +3290,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the Table for which to check replication consistency. Values are of the form `projects//instances//tables/`. + * @param {string} params.name Required. The unique name of the Table for which to check replication consistency. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. * @param {().CheckConsistencyRequest} params.requestBody 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. @@ -3270,7 +3370,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent The unique name of the instance in which to create the table. Values are of the form `projects//instances/`. + * @param {string} params.parent Required. The unique name of the instance in which to create the table. Values are of the form `projects/{project}/instances/{instance}`. * @param {().CreateTableRequest} params.requestBody 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. @@ -3344,7 +3444,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the table to be deleted. Values are of the form `projects//instances//tables/
`. + * @param {string} params.name Required. The unique name of the table to be deleted. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. * @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 @@ -3414,7 +3514,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the table on which to drop a range of rows. Values are of the form `projects//instances//tables/
`. + * @param {string} params.name Required. The unique name of the table on which to drop a range of rows. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. * @param {().DropRowRangeRequest} params.requestBody 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. @@ -3488,7 +3588,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the Table for which to create a consistency token. Values are of the form `projects//instances//tables/
`. + * @param {string} params.name Required. The unique name of the Table for which to create a consistency token. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. * @param {().GenerateConsistencyTokenRequest} params.requestBody 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. @@ -3573,7 +3673,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the requested table. Values are of the form `projects//instances//tables/
`. + * @param {string} params.name Required. The unique name of the requested table. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. * @param {string=} params.view The view to be applied to the returned table's fields. Defaults to `SCHEMA_VIEW` if unspecified. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3720,7 +3820,7 @@ export namespace bigtableadmin_v2 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Maximum number of results per page. A page_size of zero lets the server choose the number of items to return. A page_size which is strictly positive will return at most that many items. A negative page_size will cause an error. Following the first request, subsequent paginated calls are not required to pass a page_size. If a page_size is set in subsequent calls, it must match the page_size given in the first request. * @param {string=} params.pageToken The value of `next_page_token` returned by a previous call. - * @param {string} params.parent The unique name of the instance for which tables should be listed. Values are of the form `projects//instances/`. + * @param {string} params.parent Required. The unique name of the instance for which tables should be listed. Values are of the form `projects/{project}/instances/{instance}`. * @param {string=} params.view The view to be applied to the returned tables' fields. Only NAME_ONLY view (default) and REPLICATION_VIEW are supported. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3796,7 +3896,7 @@ export namespace bigtableadmin_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The unique name of the table whose families should be modified. Values are of the form `projects//instances//tables/
`. + * @param {string} params.name Required. The unique name of the table whose families should be modified. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. * @param {().ModifyColumnFamiliesRequest} params.requestBody 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. @@ -4029,7 +4129,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the Table for which to check replication consistency. Values are of the form `projects//instances//tables/
`. + * Required. The unique name of the Table for which to check replication consistency. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. */ name?: string; @@ -4046,7 +4146,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the instance in which to create the table. Values are of the form `projects//instances/`. + * Required. The unique name of the instance in which to create the table. Values are of the form `projects/{project}/instances/{instance}`. */ parent?: string; @@ -4063,7 +4163,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the table to be deleted. Values are of the form `projects//instances//tables/
`. + * Required. The unique name of the table to be deleted. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. */ name?: string; } @@ -4075,7 +4175,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the table on which to drop a range of rows. Values are of the form `projects//instances//tables/
`. + * Required. The unique name of the table on which to drop a range of rows. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. */ name?: string; @@ -4092,7 +4192,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the Table for which to create a consistency token. Values are of the form `projects//instances//tables/
`. + * Required. The unique name of the Table for which to create a consistency token. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. */ name?: string; @@ -4109,7 +4209,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the requested table. Values are of the form `projects//instances//tables/
`. + * Required. The unique name of the requested table. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. */ name?: string; /** @@ -4150,7 +4250,7 @@ export namespace bigtableadmin_v2 { */ pageToken?: string; /** - * The unique name of the instance for which tables should be listed. Values are of the form `projects//instances/`. + * Required. The unique name of the instance for which tables should be listed. Values are of the form `projects/{project}/instances/{instance}`. */ parent?: string; /** @@ -4166,7 +4266,7 @@ export namespace bigtableadmin_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The unique name of the table whose families should be modified. Values are of the form `projects//instances//tables/
`. + * Required. The unique name of the table whose families should be modified. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`. */ name?: string; diff --git a/src/apis/billingbudgets/v1beta1.ts b/src/apis/billingbudgets/v1beta1.ts index d336e7db60..c20393eeb8 100644 --- a/src/apis/billingbudgets/v1beta1.ts +++ b/src/apis/billingbudgets/v1beta1.ts @@ -157,7 +157,7 @@ export namespace billingbudgets_v1beta1 { */ name?: string | null; /** - * Required. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. + * Optional. Rules that trigger alerts (notifications of thresholds being crossed) when spend exceeds the specified percentages of the budget. */ thresholdRules?: Schema$GoogleCloudBillingBudgetsV1beta1ThresholdRule[]; } @@ -192,7 +192,7 @@ export namespace billingbudgets_v1beta1 { */ creditTypesTreatment?: string | null; /** - * Optional. A set of projects of the form `projects/{project_id}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently. + * Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently. */ projects?: string[] | null; /** @@ -447,7 +447,7 @@ export namespace billingbudgets_v1beta1 { /** * billingbudgets.billingAccounts.budgets.get - * @desc Returns a budget. + * @desc Returns a budget. WARNING: There are some fields exposed on the Google Cloud Console that aren’t available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console. * @alias billingbudgets.billingAccounts.budgets.get * @memberOf! () * @@ -536,7 +536,7 @@ export namespace billingbudgets_v1beta1 { /** * billingbudgets.billingAccounts.budgets.list - * @desc Returns a list of budgets for a billing account. + * @desc Returns a list of budgets for a billing account. WARNING: There are some fields exposed on the Google Cloud Console that aren’t available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console. * @alias billingbudgets.billingAccounts.budgets.list * @memberOf! () * @@ -639,7 +639,7 @@ export namespace billingbudgets_v1beta1 { /** * billingbudgets.billingAccounts.budgets.patch - * @desc Updates a budget and returns the updated budget. + * @desc Updates a budget and returns the updated budget. WARNING: There are some fields exposed on the Google Cloud Console that aren’t available on this API. Budget fields that are not exposed in this API will not be changed by this method. * @alias billingbudgets.billingAccounts.budgets.patch * @memberOf! () * diff --git a/src/apis/chat/v1.ts b/src/apis/chat/v1.ts index f83c9cd911..5e9dd43738 100644 --- a/src/apis/chat/v1.ts +++ b/src/apis/chat/v1.ts @@ -277,7 +277,7 @@ export namespace chat_v1 { */ export interface Schema$FormAction { /** - * Apps Script function to invoke when the containing element is clicked/activated. + * The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. */ actionMethodName?: string | null; /** diff --git a/src/apis/clouddebugger/v2.ts b/src/apis/clouddebugger/v2.ts index f3285b0df9..957b6816ea 100644 --- a/src/apis/clouddebugger/v2.ts +++ b/src/apis/clouddebugger/v2.ts @@ -87,7 +87,7 @@ export namespace clouddebugger_v2 { } /** - * Stackdriver Debugger API + * Cloud Debugger API * * Examines the call stack and variables of a running application without stopping or slowing it down. * diff --git a/src/apis/clouderrorreporting/v1beta1.ts b/src/apis/clouderrorreporting/v1beta1.ts index 664577c8c1..d20bccddd4 100644 --- a/src/apis/clouderrorreporting/v1beta1.ts +++ b/src/apis/clouderrorreporting/v1beta1.ts @@ -87,7 +87,7 @@ export namespace clouderrorreporting_v1beta1 { } /** - * Stackdriver Error Reporting API + * Error Reporting API * * Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors. * diff --git a/src/apis/cloudidentity/v1beta1.ts b/src/apis/cloudidentity/v1beta1.ts index ebe814be08..50b48f36e7 100644 --- a/src/apis/cloudidentity/v1beta1.ts +++ b/src/apis/cloudidentity/v1beta1.ts @@ -129,11 +129,24 @@ export namespace cloudidentity_v1beta1 { namespace?: string | null; } /** - * A group within the Cloud Identity Groups API. A `Group` is a collection of entities, where each entity is either a user or another group. + * The response message for MembershipsService.GetMembershipGraph. + */ + export interface Schema$GetMembershipGraphResponse { + /** + * The membership graph's path information represented as an adjacency list. + */ + adjacencyList?: Schema$MembershipAdjacencyList[]; + /** + * The resources representing each group in the adjacency list. Each group in this list can be correlated to a 'group' of the MembershipAdjacencyList using the 'name' of the Group resource. + */ + groups?: Schema$Group[]; + } + /** + * A group within the Cloud Identity Groups API. A `Group` is a collection of entities, where each entity is either a user or another group or a service account. */ export interface Schema$Group { /** - * Optional. Additional entity key aliases for a Group. + * Additional entity key aliases for a Group. */ additionalGroupKeys?: Schema$EntityKey[]; /** @@ -242,6 +255,19 @@ export namespace cloudidentity_v1beta1 { */ updateTime?: string | null; } + /** + * Membership graph's path information as an adjacency list. + */ + export interface Schema$MembershipAdjacencyList { + /** + * Each edge contains information about the member that belongs to this group. + */ + edges?: Schema$Membership[]; + /** + * Resource name of the group that the members belong to. + */ + group?: string | null; + } /** * A membership role within the Cloud Identity Groups API. A `MembershipRole` defines the privileges granted to a `Membership`. */ diff --git a/src/apis/cloudtasks/v2.ts b/src/apis/cloudtasks/v2.ts index bbfdc711ff..de4727bd30 100644 --- a/src/apis/cloudtasks/v2.ts +++ b/src/apis/cloudtasks/v2.ts @@ -423,6 +423,10 @@ export namespace cloudtasks_v2 { * Settings that determine the retry behavior. * For tasks created using Cloud Tasks: the queue-level retry settings apply to all tasks in the queue that were created using Cloud Tasks. Retry settings cannot be set on individual tasks. * For tasks created using the App Engine SDK: the queue-level retry settings apply to all tasks in the queue which do not have retry settings explicitly set on the task and were created by the App Engine SDK. See [App Engine documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). */ retryConfig?: Schema$RetryConfig; + /** + * Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this field is unset, then no logs are written. + */ + stackdriverLoggingConfig?: Schema$StackdriverLoggingConfig; /** * Output only. The state of the queue. `state` can only be changed by called PauseQueue, ResumeQueue, or uploading [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`. */ @@ -492,6 +496,15 @@ export namespace cloudtasks_v2 { */ policy?: Schema$Policy; } + /** + * Configuration options for writing logs to [Stackdriver Logging](https://cloud.google.com/logging/docs/). + */ + export interface Schema$StackdriverLoggingConfig { + /** + * Specifies the fraction of operations to write to [Stackdriver Logging](https://cloud.google.com/logging/docs/). This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged. + */ + samplingRatio?: number | null; + } /** * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ diff --git a/src/apis/cloudtrace/README.md b/src/apis/cloudtrace/README.md index 8293afb24b..f2d9695782 100644 --- a/src/apis/cloudtrace/README.md +++ b/src/apis/cloudtrace/README.md @@ -2,7 +2,7 @@ # cloudtrace -> Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenCensus. +> Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenCensus. ## Installation diff --git a/src/apis/cloudtrace/v1.ts b/src/apis/cloudtrace/v1.ts index b7e9526c08..9193084ef7 100644 --- a/src/apis/cloudtrace/v1.ts +++ b/src/apis/cloudtrace/v1.ts @@ -87,9 +87,9 @@ export namespace cloudtrace_v1 { } /** - * Stackdriver Trace API + * Cloud Trace API * - * Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenCensus. + * Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenCensus. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/cloudtrace/v2.ts b/src/apis/cloudtrace/v2.ts index 70c98994b8..ac14bc3d04 100644 --- a/src/apis/cloudtrace/v2.ts +++ b/src/apis/cloudtrace/v2.ts @@ -87,9 +87,9 @@ export namespace cloudtrace_v2 { } /** - * Stackdriver Trace API + * Cloud Trace API * - * Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenCensus. + * Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenCensus. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/cloudtrace/v2beta1.ts b/src/apis/cloudtrace/v2beta1.ts index 3e34f084cf..00d6fd86f7 100644 --- a/src/apis/cloudtrace/v2beta1.ts +++ b/src/apis/cloudtrace/v2beta1.ts @@ -87,9 +87,9 @@ export namespace cloudtrace_v2beta1 { } /** - * Stackdriver Trace API + * Cloud Trace API * - * Sends application trace data to Stackdriver Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Stackdriver Trace, we recommend using OpenCensus. + * Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenCensus. * * @example * const {google} = require('googleapis'); diff --git a/src/apis/commentanalyzer/v1alpha1.ts b/src/apis/commentanalyzer/v1alpha1.ts index 7c3a7c0739..1ba9e99568 100644 --- a/src/apis/commentanalyzer/v1alpha1.ts +++ b/src/apis/commentanalyzer/v1alpha1.ts @@ -144,7 +144,7 @@ export namespace commentanalyzer_v1alpha1 { */ languages?: string[] | null; /** - * Specification of requested attributes. The AttributeParameters serve as configuration for each associated attribute. The map keys are attribute names. The available attributes may be different on each RFE installation, and can be seen by calling ListAttributes (see above). For the prod installation, known as Perspective API, at blade:commentanalyzer-esf and commentanalyzer.googleapis.com, see go/checker-models (internal) and https://github.com/conversationai/perspectiveapi/blob/master/api_reference.md#models. + * Specification of requested attributes. The AttributeParameters serve as configuration for each associated attribute. The map keys are attribute names. The available attributes may be different on each RFE installation, and can be seen by calling ListAttributes (see above). For the prod installation, known as Perspective API, at blade:commentanalyzer-esf and commentanalyzer.googleapis.com, see go/checker-models (internal) and https://github.com/conversationai/perspectiveapi/blob/master/2-api/models.md#all-attribute-types. */ requestedAttributes?: {[key: string]: Schema$AttributeParameters} | null; /** diff --git a/src/apis/container/v1.ts b/src/apis/container/v1.ts index 3200db288d..12f7ab440d 100644 --- a/src/apis/container/v1.ts +++ b/src/apis/container/v1.ts @@ -227,15 +227,15 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. + * Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. */ operationId?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -466,6 +466,10 @@ export namespace container_v1 { * Cluster-level Vertical Pod Autoscaling configuration. */ verticalPodAutoscaling?: Schema$VerticalPodAutoscaling; + /** + * Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. + */ + workloadIdentityConfig?: Schema$WorkloadIdentityConfig; /** * [Output only] The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field is deprecated, use location instead. */ @@ -564,13 +568,17 @@ export namespace container_v1 { * Cluster-level Vertical Pod Autoscaling configuration. */ desiredVerticalPodAutoscaling?: Schema$VerticalPodAutoscaling; + /** + * Configuration for Workload Identity. + */ + desiredWorkloadIdentityConfig?: Schema$WorkloadIdentityConfig; } /** * CompleteIPRotationRequest moves the cluster master back into single-IP mode. */ export interface Schema$CompleteIPRotationRequest { /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -578,11 +586,11 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -608,11 +616,11 @@ export namespace container_v1 { */ parent?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. */ zone?: string | null; } @@ -621,7 +629,7 @@ export namespace container_v1 { */ export interface Schema$CreateNodePoolRequest { /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. */ clusterId?: string | null; /** @@ -633,11 +641,11 @@ export namespace container_v1 { */ parent?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. */ zone?: string | null; } @@ -1006,6 +1014,27 @@ export namespace container_v1 { */ maxPodsPerNode?: string | null; } + /** + * Progress metric is (string, int|float|string) pair. + */ + export interface Schema$Metric { + /** + * For metrics with floating point value. + */ + doubleValue?: number | null; + /** + * For metrics with integer value. + */ + intValue?: string | null; + /** + * Required. Metric name, e.g., "nodes total", "percent done". + */ + name?: string | null; + /** + * For metrics with custom values (ratios, visual progress, etc.). + */ + stringValue?: string | null; + } /** * NetworkConfig reports the relative names of network & subnetwork. */ @@ -1117,6 +1146,10 @@ export namespace container_v1 { * List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ */ taints?: Schema$NodeTaint[]; + /** + * The workload metadata configuration for this node. + */ + workloadMetadataConfig?: Schema$WorkloadMetadataConfig; } /** * NodeManagement defines the set of node management services turned on for the node pool. @@ -1270,6 +1303,10 @@ export namespace container_v1 { * The operation type. */ operationType?: string | null; + /** + * Output only. [Output only] Progress information for an operation. + */ + progress?: Schema$OperationProgress; /** * Server-defined URL for the resource. */ @@ -1283,7 +1320,7 @@ export namespace container_v1 { */ status?: string | null; /** - * If an error has occurred, a textual description of the error. + * Output only. If an error has occurred, a textual description of the error. */ statusMessage?: string | null; /** @@ -1295,6 +1332,27 @@ export namespace container_v1 { */ zone?: string | null; } + /** + * Information about operation (or operation stage) progress. + */ + export interface Schema$OperationProgress { + /** + * Progress metric bundle, for example: metrics: [{name: "nodes done", int_value: 15}, {name: "nodes total", int_value: 32}] or metrics: [{name: "progress", double_value: 0.56}, {name: "progress scale", double_value: 1.0}] + */ + metrics?: Schema$Metric[]; + /** + * A non-parameterized string describing an operation stage. Unset for single-stage operations. + */ + name?: string | null; + /** + * Substages of an operation or a stage. + */ + stages?: Schema$OperationProgress[]; + /** + * Status of an operation stage. Unset for single-stage operations. + */ + status?: string | null; + } /** * Configuration options for private clusters. */ @@ -1346,7 +1404,7 @@ export namespace container_v1 { */ consumeReservationType?: string | null; /** - * Corresponds to the label key of reservation resource. + * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. */ key?: string | null; /** @@ -1393,7 +1451,7 @@ export namespace container_v1 { */ export interface Schema$RollbackNodePoolUpgradeRequest { /** - * Required. Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1401,15 +1459,15 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. */ nodePoolId?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1456,7 +1514,7 @@ export namespace container_v1 { */ addonsConfig?: Schema$AddonsConfig; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1464,11 +1522,11 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1477,7 +1535,7 @@ export namespace container_v1 { */ export interface Schema$SetLabelsRequest { /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1489,7 +1547,7 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** @@ -1497,7 +1555,7 @@ export namespace container_v1 { */ resourceLabels?: {[key: string]: string} | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1506,7 +1564,7 @@ export namespace container_v1 { */ export interface Schema$SetLegacyAbacRequest { /** - * Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1518,11 +1576,11 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1531,7 +1589,7 @@ export namespace container_v1 { */ export interface Schema$SetLocationsRequest { /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1543,11 +1601,11 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1556,7 +1614,7 @@ export namespace container_v1 { */ export interface Schema$SetLoggingServiceRequest { /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1568,11 +1626,11 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1610,7 +1668,7 @@ export namespace container_v1 { */ action?: string | null; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1618,7 +1676,7 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** @@ -1626,7 +1684,7 @@ export namespace container_v1 { */ update?: Schema$MasterAuth; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1635,7 +1693,7 @@ export namespace container_v1 { */ export interface Schema$SetMonitoringServiceRequest { /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1647,11 +1705,11 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1660,7 +1718,7 @@ export namespace container_v1 { */ export interface Schema$SetNetworkPolicyRequest { /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1672,11 +1730,11 @@ export namespace container_v1 { */ networkPolicy?: Schema$NetworkPolicy; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1689,7 +1747,7 @@ export namespace container_v1 { */ autoscaling?: Schema$NodePoolAutoscaling; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1697,15 +1755,15 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. */ nodePoolId?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1714,7 +1772,7 @@ export namespace container_v1 { */ export interface Schema$SetNodePoolManagementRequest { /** - * Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1726,15 +1784,15 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. */ nodePoolId?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1743,7 +1801,7 @@ export namespace container_v1 { */ export interface Schema$SetNodePoolSizeRequest { /** - * Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1755,15 +1813,15 @@ export namespace container_v1 { */ nodeCount?: number | null; /** - * Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. */ nodePoolId?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1794,7 +1852,7 @@ export namespace container_v1 { */ export interface Schema$StartIPRotationRequest { /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1802,7 +1860,7 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** @@ -1810,7 +1868,7 @@ export namespace container_v1 { */ rotateCredentials?: boolean | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1845,7 +1903,7 @@ export namespace container_v1 { */ export interface Schema$UpdateClusterRequest { /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1853,7 +1911,7 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** @@ -1861,7 +1919,7 @@ export namespace container_v1 { */ update?: Schema$ClusterUpdate; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1870,7 +1928,7 @@ export namespace container_v1 { */ export interface Schema$UpdateMasterRequest { /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1882,11 +1940,11 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1895,7 +1953,7 @@ export namespace container_v1 { */ export interface Schema$UpdateNodePoolRequest { /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string | null; /** @@ -1911,7 +1969,7 @@ export namespace container_v1 { */ name?: string | null; /** - * Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. */ nodePoolId?: string | null; /** @@ -1919,7 +1977,7 @@ export namespace container_v1 { */ nodeVersion?: string | null; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; /** @@ -1927,7 +1985,11 @@ export namespace container_v1 { */ upgradeSettings?: Schema$UpgradeSettings; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * The desired workload metadata config for the node pool. + */ + workloadMetadataConfig?: Schema$WorkloadMetadataConfig; + /** + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string | null; } @@ -1995,6 +2057,24 @@ export namespace container_v1 { */ enabled?: boolean | null; } + /** + * Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. + */ + export interface Schema$WorkloadIdentityConfig { + /** + * The workload pool to attach all Kubernetes service accounts to. + */ + workloadPool?: string | null; + } + /** + * WorkloadMetadataConfig defines the metadata configuration to expose to workloads on the node pool. + */ + export interface Schema$WorkloadMetadataConfig { + /** + * Mode is the configuration for how to expose metadata to workloads running on the node pool. + */ + mode?: string | null; + } export class Resource$Projects { context: APIRequestContext; @@ -2264,8 +2344,8 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string} params.name The name (project and location) of the server config to get, specified in the format 'projects/x/locations/x'. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name 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 @@ -2345,11 +2425,11 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -2674,10 +2754,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.clusterId Required. Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. + * @param {string=} params.clusterId Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. * @param {string} params.name The name (project, location, cluster) of the cluster to delete. Specified in the format 'projects/x/locations/x/clusters/x'. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -2795,10 +2875,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.clusterId Required. Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. + * @param {string=} params.clusterId Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. * @param {string} params.name The name (project, location, cluster) of the cluster to retrieve. Specified in the format 'projects/x/locations/x/clusters/x'. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -3038,8 +3118,8 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string} params.parent The parent (project and location) where the clusters will be listed. Specified in the format 'projects/x/locations/x'. Location "-" matches all zones and all regions. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent 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 @@ -4664,7 +4744,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -4672,11 +4752,11 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -4688,7 +4768,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -4696,11 +4776,11 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -4728,11 +4808,11 @@ export namespace container_v1 { */ parent?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. */ zone?: string; } @@ -5129,11 +5209,11 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string=} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. * @param {string} params.name The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format 'projects/x/locations/x/clusters/x/nodePools/x'. - * @param {string=} params.nodePoolId Required. Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string=} params.nodePoolId Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -5252,11 +5332,11 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string=} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. * @param {string} params.name The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format 'projects/x/locations/x/clusters/x/nodePools/x'. - * @param {string=} params.nodePoolId Required. Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string=} params.nodePoolId Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -5372,10 +5452,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + * @param {string=} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. * @param {string} params.parent The parent (project, location, cluster id) where the node pools will be listed. Specified in the format 'projects/x/locations/x/clusters/x'. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent 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 @@ -6103,7 +6183,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -6111,15 +6191,15 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -6131,7 +6211,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -6139,15 +6219,15 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -6159,7 +6239,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. */ clusterId?: string; /** @@ -6167,11 +6247,11 @@ export namespace container_v1 { */ parent?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. */ zone?: string; } @@ -6584,9 +6664,9 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string} params.name The name (project, location, operation id) of the operation to get. Specified in the format 'projects/x/locations/x/operations/x'. - * @param {string=} params.operationId Required. Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string=} params.operationId Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -6706,8 +6786,8 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string} params.parent The parent (project and location) where the operations will be listed. Specified in the format 'projects/x/locations/x'. Location "-" matches all zones and all regions. - * @param {string=} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. - * @param {string=} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field. + * @param {string=} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * @param {string=} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent 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 @@ -6806,15 +6886,15 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. + * Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. */ operationId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -6830,11 +6910,11 @@ export namespace container_v1 { */ parent?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field. */ zone?: string; } @@ -6910,8 +6990,8 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string=} params.name The name (project and location) of the server config to get, specified in the format 'projects/x/locations/x'. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name 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 @@ -6990,11 +7070,11 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -7078,9 +7158,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetAddonsConfigRequest} params.requestBody 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. @@ -7217,9 +7297,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().CompleteIPRotationRequest} params.requestBody 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. @@ -7352,8 +7432,8 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. * @param {().CreateClusterRequest} params.requestBody 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. @@ -7485,10 +7565,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. * @param {string=} params.name The name (project, location, cluster) of the cluster to delete. Specified in the format 'projects/x/locations/x/clusters/x'. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -7620,10 +7700,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. * @param {string=} params.name The name (project, location, cluster) of the cluster to retrieve. Specified in the format 'projects/x/locations/x/clusters/x'. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -7757,9 +7837,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetLegacyAbacRequest} params.requestBody 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. @@ -7889,8 +7969,8 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string=} params.parent The parent (project and location) where the clusters will be listed. Specified in the format 'projects/x/locations/x'. Location "-" matches all zones and all regions. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent 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 @@ -8027,9 +8107,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetLocationsRequest} params.requestBody 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. @@ -8166,9 +8246,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetLoggingServiceRequest} params.requestBody 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. @@ -8305,9 +8385,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().UpdateMasterRequest} params.requestBody 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. @@ -8444,9 +8524,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetMonitoringServiceRequest} params.requestBody 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. @@ -8583,9 +8663,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetLabelsRequest} params.requestBody 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. @@ -8860,9 +8940,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetMasterAuthRequest} params.requestBody 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. @@ -8999,9 +9079,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetNetworkPolicyRequest} params.requestBody 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. @@ -9138,9 +9218,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().StartIPRotationRequest} params.requestBody 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. @@ -9278,9 +9358,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().UpdateClusterRequest} params.requestBody 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. @@ -9357,15 +9437,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9382,15 +9462,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9407,11 +9487,11 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. */ zone?: string; @@ -9428,7 +9508,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to delete. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -9436,11 +9516,11 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -9452,7 +9532,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to retrieve. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -9460,11 +9540,11 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -9476,15 +9556,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9505,11 +9585,11 @@ export namespace container_v1 { */ parent?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides, or "-" for all zones. This field has been deprecated and replaced by the parent field. */ zone?: string; } @@ -9521,15 +9601,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9546,15 +9626,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9571,15 +9651,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9596,15 +9676,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9621,15 +9701,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9671,15 +9751,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9696,15 +9776,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9721,15 +9801,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9746,15 +9826,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -9843,10 +9923,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.nodePoolId Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.nodePoolId Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetNodePoolAutoscalingRequest} params.requestBody 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. @@ -9983,9 +10063,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. * @param {().CreateNodePoolRequest} params.requestBody 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. @@ -10122,11 +10202,11 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. * @param {string=} params.name The name (project, location, cluster, node pool id) of the node pool to delete. Specified in the format 'projects/x/locations/x/clusters/x/nodePools/x'. - * @param {string} params.nodePoolId Required. Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.nodePoolId Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -10262,11 +10342,11 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. * @param {string=} params.name The name (project, location, cluster, node pool id) of the node pool to get. Specified in the format 'projects/x/locations/x/clusters/x/nodePools/x'. - * @param {string} params.nodePoolId Required. Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.nodePoolId Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -10396,10 +10476,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + * @param {string} params.clusterId Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. * @param {string=} params.parent The parent (project, location, cluster id) where the node pools will be listed. Specified in the format 'projects/x/locations/x/clusters/x'. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent 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 @@ -10541,10 +10621,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. - * @param {string} params.nodePoolId Required. Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. + * @param {string} params.nodePoolId Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().RollbackNodePoolUpgradeRequest} params.requestBody 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. @@ -10685,10 +10765,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. - * @param {string} params.nodePoolId Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * @param {string} params.nodePoolId Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetNodePoolManagementRequest} params.requestBody 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. @@ -10829,10 +10909,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. - * @param {string} params.nodePoolId Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * @param {string} params.nodePoolId Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().SetNodePoolSizeRequest} params.requestBody 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. @@ -10973,10 +11053,10 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.clusterId Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.nodePoolId Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.clusterId Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.nodePoolId Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. * @param {().UpdateNodePoolRequest} params.requestBody 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. @@ -11053,19 +11133,19 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -11082,15 +11162,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. */ clusterId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. */ zone?: string; @@ -11107,7 +11187,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -11115,15 +11195,15 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to delete. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -11135,7 +11215,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** @@ -11143,15 +11223,15 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -11163,7 +11243,7 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the cluster. This field has been deprecated and replaced by the parent field. */ clusterId?: string; /** @@ -11171,11 +11251,11 @@ export namespace container_v1 { */ parent?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://developers.google.com/console/help/new/#projectnumber). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field. */ zone?: string; } @@ -11187,19 +11267,19 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to rollback. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to rollback. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -11216,19 +11296,19 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -11245,19 +11325,19 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to update. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to update. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -11274,19 +11354,19 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field. */ clusterId?: string; /** - * Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field. */ nodePoolId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -11367,9 +11447,9 @@ export namespace container_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.operationId Required. Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field. + * @param {string} params.operationId Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field. * @param {().CancelOperationRequest} params.requestBody 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. @@ -11501,9 +11581,9 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string=} params.name The name (project, location, operation id) of the operation to get. Specified in the format 'projects/x/locations/x/operations/x'. - * @param {string} params.operationId Required. Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * @param {string} params.operationId Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name 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 @@ -11631,8 +11711,8 @@ export namespace container_v1 { * * @param {object} params Parameters for request * @param {string=} params.parent The parent (project and location) where the operations will be listed. Specified in the format 'projects/x/locations/x'. Location "-" matches all zones and all regions. - * @param {string} params.projectId Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. - * @param {string} params.zone Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field. + * @param {string} params.projectId Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * @param {string} params.zone Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent 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 @@ -11709,15 +11789,15 @@ export namespace container_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. + * Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. */ operationId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field. */ zone?: string; @@ -11738,15 +11818,15 @@ export namespace container_v1 { */ name?: string; /** - * Required. Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. + * Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field. */ operationId?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field. */ zone?: string; } @@ -11762,11 +11842,11 @@ export namespace container_v1 { */ parent?: string; /** - * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. + * Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the parent field. */ projectId?: string; /** - * Required. Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field. + * Deprecated. The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations for, or `-` for all zones. This field has been deprecated and replaced by the parent field. */ zone?: string; } diff --git a/src/apis/container/v1beta1.ts b/src/apis/container/v1beta1.ts index e7cedc7a7f..f7a009def1 100644 --- a/src/apis/container/v1beta1.ts +++ b/src/apis/container/v1beta1.ts @@ -141,7 +141,7 @@ export namespace container_v1beta1 { */ dnsCacheConfig?: Schema$DnsCacheConfig; /** - * Configuration for the GCE PD CSI driver. This option can only be enabled at cluster creation time. + * Configuration for the GCP Compute Persistent Disk CSI driver. */ gcePersistentDiskCsiDriverConfig?: Schema$GcePersistentDiskCsiDriverConfig; /** @@ -1197,7 +1197,7 @@ export namespace container_v1beta1 { */ intValue?: string | null; /** - * Metric name, required. e.g., "nodes total", "percent done" + * Required. Metric name, e.g., "nodes total", "percent done". */ name?: string | null; /** @@ -1478,7 +1478,7 @@ export namespace container_v1beta1 { */ operationType?: string | null; /** - * [Output only] Progress information for an operation. + * Output only. [Output only] Progress information for an operation. */ progress?: Schema$OperationProgress; /** @@ -1494,7 +1494,7 @@ export namespace container_v1beta1 { */ status?: string | null; /** - * If an error has occurred, a textual description of the error. + * Output only. If an error has occurred, a textual description of the error. */ statusMessage?: string | null; /** @@ -1630,7 +1630,7 @@ export namespace container_v1beta1 { */ consumeReservationType?: string | null; /** - * Corresponds to the label key of reservation resource. + * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. */ key?: string | null; /** @@ -2245,7 +2245,7 @@ export namespace container_v1beta1 { */ upgradeSettings?: Schema$UpgradeSettings; /** - * The desired image type for the node pool. + * The desired workload metadata config for the node pool. */ workloadMetadataConfig?: Schema$WorkloadMetadataConfig; /** @@ -2325,11 +2325,19 @@ export namespace container_v1beta1 { * IAM Identity Namespace to attach all Kubernetes Service Accounts to. */ identityNamespace?: string | null; + /** + * The workload pool to attach all Kubernetes service accounts to. + */ + workloadPool?: string | null; } /** * WorkloadMetadataConfig defines the metadata configuration to expose to workloads on the node pool. */ export interface Schema$WorkloadMetadataConfig { + /** + * Mode is the configuration for how to expose metadata to workloads running on the node pool. + */ + mode?: string | null; /** * NodeMetadata is the configuration for how to expose metadata to the workloads running on the node. */ diff --git a/src/apis/content/v2.1.ts b/src/apis/content/v2.1.ts index e384151079..d4635083ba 100644 --- a/src/apis/content/v2.1.ts +++ b/src/apis/content/v2.1.ts @@ -100,6 +100,7 @@ export namespace content_v2_1 { pos: Resource$Pos; products: Resource$Products; productstatuses: Resource$Productstatuses; + pubsubnotificationsettings: Resource$Pubsubnotificationsettings; regionalinventory: Resource$Regionalinventory; returnaddress: Resource$Returnaddress; returnpolicy: Resource$Returnpolicy; @@ -124,6 +125,9 @@ export namespace content_v2_1 { this.pos = new Resource$Pos(this.context); this.products = new Resource$Products(this.context); this.productstatuses = new Resource$Productstatuses(this.context); + this.pubsubnotificationsettings = new Resource$Pubsubnotificationsettings( + this.context + ); this.regionalinventory = new Resource$Regionalinventory(this.context); this.returnaddress = new Resource$Returnaddress(this.context); this.returnpolicy = new Resource$Returnpolicy(this.context); @@ -830,7 +834,13 @@ export namespace content_v2_1 { value?: string | null; } export interface Schema$CustomerReturnReason { + /** + * Description of the reason. + */ description?: string | null; + /** + * Code of the return reason. + */ reasonCode?: string | null; } export interface Schema$CutoffTime { @@ -1668,20 +1678,59 @@ export namespace content_v2_1 { */ ratio?: number | null; } + /** + * Order return. Production access (all methods) requires the order manager role. Sandbox access does not. + */ export interface Schema$MerchantOrderReturn { + /** + * The date of creation of the return, in ISO 8601 format. + */ creationDate?: string | null; + /** + * Merchant defined order ID. + */ merchantOrderId?: string | null; + /** + * Google order ID. + */ orderId?: string | null; + /** + * Order return ID generated by Google. + */ orderReturnId?: string | null; + /** + * Items of the return. + */ returnItems?: Schema$MerchantOrderReturnItem[]; + /** + * Shipments of the return. + */ returnShipments?: Schema$ReturnShipment[]; } export interface Schema$MerchantOrderReturnItem { + /** + * The reason that the customer chooses to return an item. + */ customerReturnReason?: Schema$CustomerReturnReason; + /** + * Product level item ID. If the returned items are of the same product, they will have the same ID. + */ itemId?: string | null; + /** + * The reason that merchant chooses to accept a return item. + */ merchantReturnReason?: Schema$RefundReason; + /** + * Product data from the time of the order placement. + */ product?: Schema$OrderLineItemProduct; + /** + * IDs of the return shipments that this return item belongs to. + */ returnShipmentIds?: string[] | null; + /** + * State of the item. + */ state?: string | null; } /** @@ -1742,7 +1791,7 @@ export namespace content_v2_1 { */ placedDate?: string | null; /** - * Promotions associated with the order. + * Promotions associated with the order. To determine which promotions apply to which products, check the Promotions[].appliedItems[].lineItemId field against the LineItems[].id field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: - To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the LineItems[].adjustments[].priceAdjustment.value amount from the LineItems[].Price.value. - To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the LineItems[].adjustments[].priceAdjustment.value by the quantity of products then subtract the resulting value from the LineItems[].Product.Price.value for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here. */ promotions?: Schema$OrderPromotion[]; /** @@ -2610,7 +2659,7 @@ export namespace content_v2_1 { } export interface Schema$OrderShipment { /** - * The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. Note: You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for US are: - "ups" (United Parcel Service) automatic status updates - "usps" (United States Postal Service) automatic status updates - "fedex" (FedEx) automatic status updates - "dhl" (DHL eCommerce) automatic status updates (US only) - "ontrac" (OnTrac) automatic status updates - "dhl express" (DHL Express) - "deliv" (Deliv) - "dynamex" (TForce) - "lasership" (LaserShip) - "mpx" (Military Parcel Xpress) - "uds" (United Delivery Service) - "efw" (Estes Forwarding Worldwide) - "jd logistics" (JD Logistics) - "yunexpress" (YunExpress) - "china post" (China Post) - "china ems" (China Post Express Mail Service) - "singapore post" (Singapore Post) - "pos malaysia" (Pos Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish Post) - "eub" (ePacket) - "chukou1" (Chukou1 Logistics) Supported carriers for FR are: - "la poste" (La Poste) automatic status updates - "colissimo" (Colissimo by La Poste) automatic status updates - "ups" (United Parcel Service) automatic status updates - "chronopost" (Chronopost by La Poste) - "gls" (General Logistics Systems France) - "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - "colis prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" (GEODIS) - "tnt" (TNT) - "db schenker" (DB Schenker) + * The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. Note: You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for US are: - "ups" (United Parcel Service) automatic status updates - "usps" (United States Postal Service) automatic status updates - "fedex" (FedEx) automatic status updates - "dhl" (DHL eCommerce) automatic status updates (US only) - "ontrac" (OnTrac) automatic status updates - "dhl express" (DHL Express) - "deliv" (Deliv) - "dynamex" (TForce) - "lasership" (LaserShip) - "mpx" (Military Parcel Xpress) - "uds" (United Delivery Service) - "efw" (Estes Forwarding Worldwide) - "jd logistics" (JD Logistics) - "yunexpress" (YunExpress) - "china post" (China Post) - "china ems" (China Post Express Mail Service) - "singapore post" (Singapore Post) - "pos malaysia" (Pos Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish Post) - "eub" (ePacket) - "chukou1" (Chukou1 Logistics) Supported carriers for FR are: - "la poste" (La Poste) automatic status updates - "colissimo" (Colissimo by La Poste) automatic status updates - "ups" (United Parcel Service) automatic status updates - "chronopost" (Chronopost by La Poste) - "gls" (General Logistics Systems France) - "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - "colis prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" (GEODIS) - "tnt" (TNT) - "db schenker" (DB Schenker) - "aramex" (Aramex) */ carrier?: string | null; /** @@ -3991,6 +4040,23 @@ export namespace content_v2_1 { */ value?: number | null; } + /** + * Settings for Pub/Sub notifications, all methods require that the caller is a direct user of the merchant center account. + */ + export interface Schema$PubsubNotificationSettings { + /** + * Cloud pub/sub topic to which notifications are sent (read-only). + */ + cloudTopicName?: string | null; + /** + * Identifies what kind of resource this is. Value: the fixed string "content#pubsubNotificationSettings". + */ + kind?: string | null; + /** + * List of event types. Supported event types: orderPendingShipment. + */ + registeredEvents?: string[] | null; + } export interface Schema$RateGroup { /** * A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service. Required. @@ -4018,7 +4084,13 @@ export namespace content_v2_1 { subtables?: Schema$Table[]; } export interface Schema$RefundReason { + /** + * Description of the reason. + */ description?: string | null; + /** + * Code of the refund reason. + */ reasonCode?: string | null; } /** @@ -4362,12 +4434,33 @@ export namespace content_v2_1 { startDate?: string | null; } export interface Schema$ReturnShipment { + /** + * The date of creation of the shipment, in ISO 8601 format. + */ creationDate?: string | null; + /** + * The date of delivery of the shipment, in ISO 8601 format. + */ deliveryDate?: string | null; + /** + * Type of the return method. + */ returnMethodType?: string | null; + /** + * Shipment ID generated by Google. + */ shipmentId?: string | null; + /** + * Tracking information of the shipment. One return shipment might be handled by several shipping carriers sequentially. + */ shipmentTrackingInfos?: Schema$ShipmentTrackingInfo[]; + /** + * The date of shipping of the shipment, in ISO 8601 format. + */ shippingDate?: string | null; + /** + * State of the shipment. + */ state?: string | null; } export interface Schema$Row { @@ -4451,7 +4544,13 @@ export namespace content_v2_1 { unitInvoice?: Schema$UnitInvoice; } export interface Schema$ShipmentTrackingInfo { + /** + * The shipping carrier that handles the package. + */ carrier?: string | null; + /** + * The tracking number for the package. + */ trackingNumber?: string | null; } /** @@ -12163,7 +12262,7 @@ export namespace content_v2_1 { /** * content.products.list - * @desc Lists the products in your Merchant Center account. + * @desc Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested. * @alias content.products.list * @memberOf! () * @@ -12630,6 +12729,204 @@ export namespace content_v2_1 { pageToken?: string; } + export class Resource$Pubsubnotificationsettings { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * content.pubsubnotificationsettings.get + * @desc Retrieves a Merchant Center account's pubsub notification settings. + * @alias content.pubsubnotificationsettings.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account for which to get pubsub notification settings. + * @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$Pubsubnotificationsettings$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Pubsubnotificationsettings$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Pubsubnotificationsettings$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Pubsubnotificationsettings$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Pubsubnotificationsettings$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pubsubnotificationsettings$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/content/v2.1/{merchantId}/pubsubnotificationsettings' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * content.pubsubnotificationsettings.update + * @desc Register a Merchant Center account for pubsub notifications. Note that cloud topic name should not be provided as part of the request. + * @alias content.pubsubnotificationsettings.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.merchantId The ID of the account. + * @param {().PubsubNotificationSettings} params.requestBody 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$Pubsubnotificationsettings$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Pubsubnotificationsettings$Update, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Pubsubnotificationsettings$Update, + callback: BodyResponseCallback + ): void; + update( + callback: BodyResponseCallback + ): void; + update( + paramsOrCallback?: + | Params$Resource$Pubsubnotificationsettings$Update + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Pubsubnotificationsettings$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Pubsubnotificationsettings$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/content/v2.1/{merchantId}/pubsubnotificationsettings' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', + }, + options + ), + params, + requiredParams: ['merchantId'], + pathParams: ['merchantId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Pubsubnotificationsettings$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the account for which to get pubsub notification settings. + */ + merchantId?: string; + } + export interface Params$Resource$Pubsubnotificationsettings$Update + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the account. + */ + merchantId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PubsubNotificationSettings; + } + export class Resource$Regionalinventory { context: APIRequestContext; constructor(context: APIRequestContext) { diff --git a/src/apis/content/v2.ts b/src/apis/content/v2.ts index a9da16d752..8012db4ce9 100644 --- a/src/apis/content/v2.ts +++ b/src/apis/content/v2.ts @@ -840,7 +840,13 @@ export namespace content_v2 { value?: string | null; } export interface Schema$CustomerReturnReason { + /** + * Description of the reason. + */ description?: string | null; + /** + * Code of the return reason. + */ reasonCode?: string | null; } export interface Schema$CustomGroup { @@ -1898,20 +1904,59 @@ export namespace content_v2 { */ ratio?: number | null; } + /** + * Order return. Production access (all methods) requires the order manager role. Sandbox access does not. + */ export interface Schema$MerchantOrderReturn { + /** + * The date of creation of the return, in ISO 8601 format. + */ creationDate?: string | null; + /** + * Merchant defined order ID. + */ merchantOrderId?: string | null; + /** + * Google order ID. + */ orderId?: string | null; + /** + * Order return ID generated by Google. + */ orderReturnId?: string | null; + /** + * Items of the return. + */ returnItems?: Schema$MerchantOrderReturnItem[]; + /** + * Shipments of the return. + */ returnShipments?: Schema$ReturnShipment[]; } export interface Schema$MerchantOrderReturnItem { + /** + * The reason that the customer chooses to return an item. + */ customerReturnReason?: Schema$CustomerReturnReason; + /** + * Product level item ID. If the returned items are of the same product, they will have the same ID. + */ itemId?: string | null; + /** + * The reason that merchant chooses to accept a return item. + */ merchantReturnReason?: Schema$RefundReason; + /** + * Product data from the time of the order placement. + */ product?: Schema$OrderLineItemProduct; + /** + * IDs of the return shipments that this return item belongs to. + */ returnShipmentIds?: string[] | null; + /** + * State of the item. + */ state?: string | null; } /** @@ -1972,7 +2017,7 @@ export namespace content_v2 { */ placedDate?: string | null; /** - * The details of the merchant provided promotions applied to the order. More details about the program are here. + * The details of the merchant provided promotions applied to the order. To determine which promotions apply to which products, check the Promotions[].Benefits[].OfferIds field against the LineItems[].Product.OfferId field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: - To calculate the line item level discount for a single specific item: For each promotion, subtract the Promotions[].Benefits[].Discount.value amount from the LineItems[].Price.value. - To calculate the line item level discount for multiple quantity of a specific item: For each promotion, divide the Promotions[].Benefits[].Discount.value by the quantity of products and substract it from LineItems[].Product.Price.value for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here. */ promotions?: Schema$OrderLegacyPromotion[]; /** @@ -3198,7 +3243,7 @@ export namespace content_v2 { } export interface Schema$OrderShipment { /** - * The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. Note: You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for US are: - "ups" (United Parcel Service) automatic status updates - "usps" (United States Postal Service) automatic status updates - "fedex" (FedEx) automatic status updates - "dhl" (DHL eCommerce) automatic status updates (US only) - "ontrac" (OnTrac) automatic status updates - "dhl express" (DHL Express) - "deliv" (Deliv) - "dynamex" (TForce) - "lasership" (LaserShip) - "mpx" (Military Parcel Xpress) - "uds" (United Delivery Service) - "efw" (Estes Forwarding Worldwide) - "jd logistics" (JD Logistics) - "yunexpress" (YunExpress) - "china post" (China Post) - "china ems" (China Post Express Mail Service) - "singapore post" (Singapore Post) - "pos malaysia" (Pos Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish Post) - "eub" (ePacket) - "chukou1" (Chukou1 Logistics) Supported carriers for FR are: - "la poste" (La Poste) automatic status updates - "colissimo" (Colissimo by La Poste) automatic status updates - "ups" (United Parcel Service) automatic status updates - "chronopost" (Chronopost by La Poste) - "gls" (General Logistics Systems France) - "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - "colis prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" (GEODIS) - "tnt" (TNT) - "db schenker" (DB Schenker) + * The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. Note: You can also use unsupported carriers, but emails to customers will not include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for US are: - "ups" (United Parcel Service) automatic status updates - "usps" (United States Postal Service) automatic status updates - "fedex" (FedEx) automatic status updates - "dhl" (DHL eCommerce) automatic status updates (US only) - "ontrac" (OnTrac) automatic status updates - "dhl express" (DHL Express) - "deliv" (Deliv) - "dynamex" (TForce) - "lasership" (LaserShip) - "mpx" (Military Parcel Xpress) - "uds" (United Delivery Service) - "efw" (Estes Forwarding Worldwide) - "jd logistics" (JD Logistics) - "yunexpress" (YunExpress) - "china post" (China Post) - "china ems" (China Post Express Mail Service) - "singapore post" (Singapore Post) - "pos malaysia" (Pos Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish Post) - "eub" (ePacket) - "chukou1" (Chukou1 Logistics) Supported carriers for FR are: - "la poste" (La Poste) automatic status updates - "colissimo" (Colissimo by La Poste) automatic status updates - "ups" (United Parcel Service) automatic status updates - "chronopost" (Chronopost by La Poste) - "gls" (General Logistics Systems France) - "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - "colis prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" (GEODIS) - "tnt" (TNT) - "db schenker" (DB Schenker) - "aramex" (Aramex) */ carrier?: string | null; /** @@ -4758,16 +4803,43 @@ export namespace content_v2 { subtables?: Schema$Table[]; } export interface Schema$RefundReason { + /** + * Description of the reason. + */ description?: string | null; + /** + * Code of the refund reason. + */ reasonCode?: string | null; } export interface Schema$ReturnShipment { + /** + * The date of creation of the shipment, in ISO 8601 format. + */ creationDate?: string | null; + /** + * The date of delivery of the shipment, in ISO 8601 format. + */ deliveryDate?: string | null; + /** + * Type of the return method. + */ returnMethodType?: string | null; + /** + * Shipment ID generated by Google. + */ shipmentId?: string | null; + /** + * Tracking information of the shipment. One return shipment might be handled by several shipping carriers sequentially. + */ shipmentTrackingInfos?: Schema$ShipmentTrackingInfo[]; + /** + * The date of shipping of the shipment, in ISO 8601 format. + */ shippingDate?: string | null; + /** + * State of the shipment. + */ state?: string | null; } export interface Schema$Row { @@ -4851,7 +4923,13 @@ export namespace content_v2 { unitInvoice?: Schema$UnitInvoice; } export interface Schema$ShipmentTrackingInfo { + /** + * The shipping carrier that handles the package. + */ carrier?: string | null; + /** + * The tracking number for the package. + */ trackingNumber?: string | null; } /** @@ -13129,7 +13207,7 @@ export namespace content_v2 { /** * content.products.list - * @desc Lists the products in your Merchant Center account. + * @desc Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested. * @alias content.products.list * @memberOf! () * diff --git a/src/apis/datacatalog/v1beta1.ts b/src/apis/datacatalog/v1beta1.ts index 07e55b461d..9937d0d4ca 100644 --- a/src/apis/datacatalog/v1beta1.ts +++ b/src/apis/datacatalog/v1beta1.ts @@ -417,6 +417,19 @@ export namespace datacatalog_v1beta1 { */ nextPageToken?: string | null; } + /** + * Response message for ListEntryGroups. + */ + export interface Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse { + /** + * EntryGroup details. + */ + entryGroups?: Schema$GoogleCloudDatacatalogV1beta1EntryGroup[]; + /** + * Token to retrieve the next page of results. It is set to empty if no items remain in results. + */ + nextPageToken?: string | null; + } /** * Response message for ListPolicyTags. */ @@ -520,21 +533,24 @@ export namespace datacatalog_v1beta1 { */ query?: string | null; /** - * Required. The scope of this search request. + * Required. The scope of this search request. A `scope` that has empty `include_org_ids`, `include_project_ids` AND false `include_gcp_public_datasets` is considered invalid. Data Catalog will return an error in such a case. */ scope?: Schema$GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope; } + /** + * The criteria that select the subspace used for query matching. + */ export interface Schema$GoogleCloudDatacatalogV1beta1SearchCatalogRequestScope { /** * If `true`, include Google Cloud Platform (GCP) public datasets in the search results. Info on GCP public datasets is available at https://cloud.google.com/public-datasets/. By default, GCP public datasets are excluded. */ includeGcpPublicDatasets?: boolean | null; /** - * Data Catalog tries to automatically choose the right corpus of data to search through. You can ensure an organization is included by adding it to `include_org_ids`. You can ensure a project's org is included with `include_project_ids`. You must specify at least one organization using `include_org_ids` or `include_project_ids` in all search requests. List of organization IDs to search within. To find your organization ID, follow instructions in https://cloud.google.com/resource-manager/docs/creating-managing-organization. + * The list of organization IDs to search within. To find your organization ID, follow instructions in https://cloud.google.com/resource-manager/docs/creating-managing-organization. */ includeOrgIds?: string[] | null; /** - * List of project IDs to search within. To learn more about the distinction between project names/IDs/numbers, go to https://cloud.google.com/docs/overview/#projects. + * The list of project IDs to search within. To learn more about the distinction between project names/IDs/numbers, go to https://cloud.google.com/docs/overview/#projects. */ includeProjectIds?: string[] | null; } @@ -679,6 +695,10 @@ export namespace datacatalog_v1beta1 { * Holds the value for a tag field with enum type. This value must be one of the allowed values in the definition of this enum. */ enumValue?: Schema$GoogleCloudDatacatalogV1beta1TagFieldEnumValue; + /** + * Output only. The order of this field with respect to other fields in this tag. It can be set in Tag. For example, a higher value can indicate a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential. + */ + order?: number | null; /** * Holds the value for a tag field with string type. */ @@ -732,6 +752,10 @@ export namespace datacatalog_v1beta1 { * Output only. The resource name of the tag template field in URL format. Example: * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} Note that this TagTemplateField may not actually be stored in the location in this name. */ name?: string | null; + /** + * The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential. + */ + order?: number | null; /** * Required. The type of value this tag field can contain. */ @@ -1401,6 +1425,108 @@ export namespace datacatalog_v1beta1 { } } + /** + * datacatalog.projects.locations.entryGroups.list + * @desc Lists entry groups. + * @alias datacatalog.projects.locations.entryGroups.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize Optional. The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for `page_size > 1000`. + * @param {string=} params.pageToken Optional. Token that specifies which page is requested. If empty, the first page is returned. + * @param {string} params.parent Required. The name of the location that contains the entry groups, which can be provided in URL format. Example: * projects/{project_id}/locations/{location} + * @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$Locations$Entrygroups$List, + options?: MethodOptions + ): GaxiosPromise< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + >; + list( + params: Params$Resource$Projects$Locations$Entrygroups$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + > + ): void; + list( + params: Params$Resource$Projects$Locations$Entrygroups$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Entrygroups$List + | BodyResponseCallback< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Entrygroups$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Entrygroups$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://datacatalog.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/entryGroups').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDatacatalogV1beta1ListEntryGroupsResponse + >(parameters); + } + } + /** * datacatalog.projects.locations.entryGroups.patch * @desc Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by the `entry_group.name` parameter (see [Data Catalog Resource Project] (/data-catalog/docs/concepts/resource-project) for more information). @@ -1717,6 +1843,26 @@ export namespace datacatalog_v1beta1 { */ requestBody?: Schema$GetIamPolicyRequest; } + export interface Params$Resource$Projects$Locations$Entrygroups$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for `page_size > 1000`. + */ + pageSize?: number; + /** + * Optional. Token that specifies which page is requested. If empty, the first page is returned. + */ + pageToken?: string; + /** + * Required. The name of the location that contains the entry groups, which can be provided in URL format. Example: * projects/{project_id}/locations/{location} + */ + parent?: string; + } export interface Params$Resource$Projects$Locations$Entrygroups$Patch extends StandardParameters { /** diff --git a/src/apis/dataproc/v1.ts b/src/apis/dataproc/v1.ts index ff38070f4c..ed7f9ea197 100644 --- a/src/apis/dataproc/v1.ts +++ b/src/apis/dataproc/v1.ts @@ -672,6 +672,10 @@ export namespace dataproc_v1 { * Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. */ numInstances?: number | null; + /** + * Optional. Specifies the preemptibility of the instance group. + */ + preemptibility?: string | null; } /** * A request to instantiate a workflow template. @@ -694,6 +698,10 @@ export namespace dataproc_v1 { * A Dataproc job resource. */ export interface Schema$Job { + /** + * Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled. + */ + done?: boolean | null; /** * Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri. */ diff --git a/src/apis/dataproc/v1beta2.ts b/src/apis/dataproc/v1beta2.ts index 87cecd95d0..1e17a4ce8b 100644 --- a/src/apis/dataproc/v1beta2.ts +++ b/src/apis/dataproc/v1beta2.ts @@ -689,6 +689,10 @@ export namespace dataproc_v1beta2 { * Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. */ numInstances?: number | null; + /** + * Optional. Specifies the preemptibility of the instance group. + */ + preemptibility?: string | null; } /** * A request to instantiate a workflow template. @@ -715,6 +719,10 @@ export namespace dataproc_v1beta2 { * A Dataproc job resource. */ export interface Schema$Job { + /** + * Output only. Indicates whether the job is completed. If the value is false, the job is still in progress. If true, the job is completed, and status.state field will indicate if it was successful, failed, or cancelled. + */ + done?: boolean | null; /** * Output only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri. */ diff --git a/src/apis/dialogflow/v2.ts b/src/apis/dialogflow/v2.ts index a84c6519c7..7326794dce 100644 --- a/src/apis/dialogflow/v2.ts +++ b/src/apis/dialogflow/v2.ts @@ -1556,7 +1556,7 @@ export namespace dialogflow_v2 { */ lifespanCount?: number | null; /** - * Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is always converted to lowercase, may only contain characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` */ name?: string | null; /** @@ -2805,7 +2805,7 @@ export namespace dialogflow_v2 { */ entityOverrideMode?: string | null; /** - * Required. The unique identifier of this session entity type. Format: `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. `<Entity Type Display Name>` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * Required. The unique identifier of this session entity type. Format: `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`, or `projects/<Project ID>/agent/environments/<Environment 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. `<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 | null; } @@ -3336,11 +3336,15 @@ export namespace dialogflow_v2 { export class Resource$Projects$Agent { context: APIRequestContext; entityTypes: Resource$Projects$Agent$Entitytypes; + environments: Resource$Projects$Agent$Environments; intents: Resource$Projects$Agent$Intents; sessions: Resource$Projects$Agent$Sessions; constructor(context: APIRequestContext) { this.context = context; this.entityTypes = new Resource$Projects$Agent$Entitytypes(this.context); + this.environments = new Resource$Projects$Agent$Environments( + this.context + ); this.intents = new Resource$Projects$Agent$Intents(this.context); this.sessions = new Resource$Projects$Agent$Sessions(this.context); } @@ -5202,6 +5206,1288 @@ export namespace dialogflow_v2 { requestBody?: Schema$GoogleCloudDialogflowV2BatchUpdateEntitiesRequest; } + export class Resource$Projects$Agent$Environments { + context: APIRequestContext; + users: Resource$Projects$Agent$Environments$Users; + constructor(context: APIRequestContext) { + this.context = context; + this.users = new Resource$Projects$Agent$Environments$Users(this.context); + } + } + + export class Resource$Projects$Agent$Environments$Users { + context: APIRequestContext; + sessions: Resource$Projects$Agent$Environments$Users$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.sessions = new Resource$Projects$Agent$Environments$Users$Sessions( + this.context + ); + } + } + + export class Resource$Projects$Agent$Environments$Users$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Agent$Environments$Users$Sessions$Contexts; + entityTypes: Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Agent$Environments$Users$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes( + this.context + ); + } + + /** + * dialogflow.projects.agent.environments.users.sessions.deleteContexts + * @desc Deletes all active contexts in the specified session. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.detectIntent + * @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. + * @alias dialogflow.projects.agent.environments.users.sessions.detectIntent + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + * @param {().GoogleCloudDialogflowV2DetectIntentRequest} params.requestBody 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 + */ + detectIntent( + params?: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + > + ): void; + detectIntent( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + > + ): void; + detectIntent( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + > + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2DetectIntentResponse + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts + extends StandardParameters { + /** + * 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 interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2DetectIntentRequest; + } + + export class Resource$Projects$Agent$Environments$Users$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.create + * @desc Creates a context. If the specified context already exists, overrides the context. + * @alias dialogflow.projects.agent.environments.users.sessions.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 {().GoogleCloudDialogflowV2Context} params.requestBody 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$Agent$Environments$Users$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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 + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.delete + * @desc Deletes the specified context. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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 + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.get + * @desc Retrieves the specified context. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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 + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.list + * @desc Returns the list of all contexts in the specified session. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListContextsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListContextsResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListContextsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListContextsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListContextsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListContextsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListContextsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2ListContextsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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 + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2ListContextsResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.patch + * @desc Updates the specified context. + * @alias dialogflow.projects.agent.environments.users.sessions.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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2Context} params.requestBody 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$Agent$Environments$Users$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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 + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create + extends StandardParameters { + /** + * 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$GoogleCloudDialogflowV2Context; + } + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete + extends StandardParameters { + /** + * 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$Agent$Environments$Users$Sessions$Contexts$Get + extends StandardParameters { + /** + * 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$Agent$Environments$Users$Sessions$Contexts$List + extends StandardParameters { + /** + * 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$Agent$Environments$Users$Sessions$Contexts$Patch + extends StandardParameters { + /** + * 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Context; + } + + export class Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.create + * @desc Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2SessionEntityType} params.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + create( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2SessionEntityType + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.delete + * @desc Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the entity type to delete. 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 {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$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.get + * @desc Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the 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 {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$Agent$Environments$Users$Sessions$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2SessionEntityType + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.list + * @desc Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.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 session entity types 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$Agent$Environments$Users$Sessions$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + >; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2ListSessionEntityTypesResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.patch + * @desc Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.patch + * @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. `` 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 {().GoogleCloudDialogflowV2SessionEntityType} params.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + patch( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2SessionEntityType + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2SessionEntityType + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The session to create a session entity type 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$GoogleCloudDialogflowV2SessionEntityType; + } + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to delete. 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List + extends StandardParameters { + /** + * 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 session entity types 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$Agent$Environments$Users$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * 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. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + } + export class Resource$Projects$Agent$Intents { context: APIRequestContext; constructor(context: APIRequestContext) { @@ -5967,7 +7253,7 @@ export namespace dialogflow_v2 { * @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/`. + * @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 @@ -6043,7 +7329,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.session Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`. It's up to the API caller to choose an appropriate session ID. It can be a random number or some type of user identifier (preferably hashed). The length of the session ID must not exceed 36 bytes. + * @param {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. * @param {().GoogleCloudDialogflowV2DetectIntentRequest} params.requestBody 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. @@ -6145,7 +7431,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/`. + * 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; } @@ -6157,7 +7443,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`. It's up to the API caller to choose an appropriate session ID. It can be a random number or some type of user identifier (preferably hashed). The length of the session ID must not exceed 36 bytes. + * Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. */ session?: string; @@ -6180,7 +7466,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The session to create a context for. Format: `projects//agent/sessions/`. + * @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 {().GoogleCloudDialogflowV2Context} params.requestBody 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. @@ -6264,7 +7550,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/`. + * @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 @@ -6335,7 +7621,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the context. Format: `projects//agent/sessions//contexts/`. + * @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 @@ -6417,7 +7703,7 @@ export namespace dialogflow_v2 { * @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/`. + * @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 @@ -6516,7 +7802,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * @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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` * @param {string=} params.updateMask Optional. The mask to control which fields get updated. * @param {().GoogleCloudDialogflowV2Context} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -6600,7 +7886,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The session to create a context for. Format: `projects//agent/sessions/`. + * 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; @@ -6617,7 +7903,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/`. + * 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; } @@ -6629,7 +7915,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the context. Format: `projects//agent/sessions//contexts/`. + * 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; } @@ -6649,7 +7935,7 @@ export namespace dialogflow_v2 { */ pageToken?: string; /** - * Required. The session to list all contexts from. Format: `projects//agent/sessions/`. + * 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; } @@ -6661,7 +7947,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` */ name?: string; /** @@ -6688,7 +7974,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The session to create a session entity type for. Format: `projects//agent/sessions/`. + * @param {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2SessionEntityType} params.requestBody 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. @@ -6780,7 +8066,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/`. + * @param {string} params.name Required. The name of the entity type to delete. 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 {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 @@ -6851,7 +8137,7 @@ export namespace dialogflow_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/`. + * @param {string} params.name Required. The name of the 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 {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 @@ -6941,7 +8227,7 @@ export namespace dialogflow_v2 { * @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 session entity types from. Format: `projects//agent/sessions/`. + * @param {string} params.parent Required. The session to list all session entity types 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 @@ -7041,7 +8327,7 @@ export namespace dialogflow_v2 { * @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/`. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * @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 {().GoogleCloudDialogflowV2SessionEntityType} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -7133,7 +8419,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The session to create a session entity type for. Format: `projects//agent/sessions/`. + * Required. The session to create a session entity type 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; @@ -7150,7 +8436,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/`. + * Required. The name of the entity type to delete. 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. */ name?: string; } @@ -7162,7 +8448,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/`. + * Required. The name of the 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. */ name?: string; } @@ -7182,7 +8468,7 @@ export namespace dialogflow_v2 { */ pageToken?: string; /** - * Required. The session to list all session entity types from. Format: `projects//agent/sessions/`. + * Required. The session to list all session entity types 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; } @@ -7194,7 +8480,7 @@ export namespace dialogflow_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * 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. */ name?: string; /** diff --git a/src/apis/dialogflow/v2beta1.ts b/src/apis/dialogflow/v2beta1.ts index e2aef44cf9..cbf50b9498 100644 --- a/src/apis/dialogflow/v2beta1.ts +++ b/src/apis/dialogflow/v2beta1.ts @@ -115,6 +115,23 @@ export namespace dialogflow_v2beta1 { } } + /** + * Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end. + */ + export interface Schema$GoogleCloudDialogflowV2AnnotatedMessagePart { + /** + * The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity. + */ + entityType?: string | null; + /** + * The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: <pre> { "amount": 5, "currency": "USD" } </pre> + */ + formattedValue?: any | null; + /** + * A part of a message possibly annotated with an entity. + */ + text?: string | null; + } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ @@ -138,45 +155,86 @@ export namespace dialogflow_v2beta1 { */ export interface Schema$GoogleCloudDialogflowV2beta1Agent { /** - * Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow-enterprise/docs/integrations/web-demo) integration. + * Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version. + */ + apiVersion?: string | null; + /** + * Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration. */ - avatarUri?: string; + avatarUri?: string | null; /** * Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used. */ - classificationThreshold?: number; + classificationThreshold?: number | null; /** - * Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the `Update` method. + * Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the `Update` method. */ - defaultLanguageCode?: string; + defaultLanguageCode?: string | null; /** * Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected. */ - description?: string; + description?: string | null; /** * Required. The name of this agent. */ - displayName?: string; + displayName?: string | null; /** * Optional. Determines whether this agent should log conversation queries. */ - enableLogging?: boolean; + enableLogging?: boolean | null; /** * Optional. Determines how intents are detected from user queries. */ - matchMode?: string; + matchMode?: string | null; /** * Required. The project of this agent. Format: `projects/<Project ID>`. */ - parent?: string; + parent?: string | null; /** * Optional. The list of all languages supported by this agent (except for the `default_language_code`). */ - supportedLanguageCodes?: string[]; + supportedLanguageCodes?: string[] | null; + /** + * Optional. The agent tier. If not specified, TIER_STANDARD is assumed. + */ + tier?: string | null; /** * Required. The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. */ - timeZone?: string; + timeZone?: string | null; + } + /** + * Represents an annotated conversation dataset. ConversationDataset can have multiple AnnotatedConversationDataset, each of them represents one result from one annotation task. AnnotatedConversationDataset can only be generated from annotation task, which will be triggered by LabelConversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnnotatedConversationDataset { + /** + * Output only. Number of examples that have annotations in the annotated conversation dataset. + */ + completedExampleCount?: string | null; + /** + * Output only. Creation time of this annotated conversation dataset. + */ + createTime?: string | null; + /** + * Optional. The description of the annotated conversation dataset. Maximum of 10000 bytes. + */ + description?: string | null; + /** + * Required. The display name of the annotated conversation dataset. It's specified when user starts an annotation task. Maximum of 64 bytes. + */ + displayName?: string | null; + /** + * Output only. Number of examples in the annotated conversation dataset. + */ + exampleCount?: string | null; + /** + * Output only. AnnotatedConversationDataset resource name. Format: `projects/<Project ID>/conversationDatasets/<Conversation Dataset ID>/annotatedConversationDatasets/<Annotated Conversation Dataset ID>` + */ + name?: string | null; + /** + * Output only. Question type name that identifies a labeling task. A question is a single task that a worker answers. A question type is set of related questions. Each question belongs to a particular question type. It can be used in CrowdCompute UI to filter and manage labeling tasks. + */ + questionTypeName?: string | null; } /** * The request message for EntityTypes.BatchCreateEntities. @@ -187,22 +245,22 @@ export namespace dialogflow_v2beta1 { */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** - * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ - languageCode?: string; + languageCode?: string | null; } /** * The request message for EntityTypes.BatchDeleteEntities. */ export interface Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest { /** - * Required. The canonical `values` of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. + * Required. The reference `values` of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. */ - entityValues?: string[]; + entityValues?: string[] | null; /** - * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ - languageCode?: string; + languageCode?: string | null; } /** * The request message for EntityTypes.BatchDeleteEntityTypes. @@ -211,7 +269,7 @@ export namespace dialogflow_v2beta1 { /** * Required. The names entity types to delete. All names must point to the same agent as `parent`. */ - entityTypeNames?: string[]; + entityTypeNames?: string[] | null; } /** * The request message for Intents.BatchDeleteIntents. @@ -231,13 +289,13 @@ export namespace dialogflow_v2beta1 { */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** - * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ - languageCode?: string; + languageCode?: string | null; /** * Optional. The mask to control which fields get updated. */ - updateMask?: string; + updateMask?: string | null; } /** * The request message for EntityTypes.BatchUpdateEntityTypes. @@ -250,15 +308,15 @@ export namespace dialogflow_v2beta1 { /** * The URI to a Google Cloud Storage file containing entity types to update or create. The file format can either be a serialized proto (of EntityBatch type) or a JSON object. Note: The URI must start with "gs://". */ - entityTypeBatchUri?: string; + entityTypeBatchUri?: string | null; /** - * Optional. The language of entity synonyms defined in `entity_types`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language of entity synonyms defined in `entity_types`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ - languageCode?: string; + languageCode?: string | null; /** * Optional. The mask to control which fields get updated. */ - updateMask?: string; + updateMask?: string | null; } /** * The response message for EntityTypes.BatchUpdateEntityTypes. @@ -280,19 +338,19 @@ export namespace dialogflow_v2beta1 { /** * The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". */ - intentBatchUri?: string; + intentBatchUri?: string | null; /** * Optional. The resource view to apply to the returned intent. */ - intentView?: string; + intentView?: string | null; /** - * Optional. The language of training phrases, parameters and rich messages defined in `intents`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language of training phrases, parameters and rich messages defined in `intents`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ - languageCode?: string; + languageCode?: string | null; /** * Optional. The mask to control which fields get updated. */ - updateMask?: string; + updateMask?: string | null; } /** * The response message for Intents.BatchUpdateIntents. @@ -310,34 +368,38 @@ 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 20 minutes if there are no matching queries. */ - lifespanCount?: number; + lifespanCount?: number | null; /** - * Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` */ - name?: string; + name?: string | null; /** - * Optional. The collection of parameters associated with this context. Refer to [this doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters) for syntax. + * Optional. The collection of parameters associated with this context. Refer to [this doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters) for syntax. */ - parameters?: {[key: string]: any}; + parameters?: {[key: string]: any} | null; } /** - * The request to detect user's intent. + * ============================================================================ Requests and responses for custom methods. The request to detect user's intent. */ export interface Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest { /** - * Optional. The natural language speech audio to be processed. This field should be populated iff `query_input` is set to an input audio config. A single request can contain up to 1 minute of speech audio data. + * The natural language speech audio to be processed. This field should be populated iff `query_input` is set to an input audio config. A single request can contain up to 1 minute of speech audio data. */ - inputAudio?: string; + inputAudio?: string | null; /** - * Optional. Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. + * Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. */ outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + /** + * Mask for output_audio_config indicating which settings in this request-level config should override speech synthesizer settings defined at agent-level. If unspecified or empty, output_audio_config replaces the agent-level config in its entirety. + */ + outputAudioConfigMask?: string | null; /** * Required. The input specification. It can be set to: 1. an audio config which instructs the speech recognizer how to process the speech audio, 2. a conversational query in the form of text, or 3. an event that specifies which intent to trigger. */ queryInput?: Schema$GoogleCloudDialogflowV2beta1QueryInput; /** - * Optional. The parameters of this query. + * The parameters of this query. */ queryParams?: Schema$GoogleCloudDialogflowV2beta1QueryParameters; } @@ -352,9 +414,9 @@ export namespace dialogflow_v2beta1 { /** * The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the `query_result.fulfillment_messages` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty. */ - outputAudio?: string; + outputAudio?: string | null; /** - * Instructs the speech synthesizer how to generate the output audio. This field is populated from the agent-level speech synthesizer configuration, if enabled. + * The config used by the speech synthesizer to generate the output audio. */ outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; /** @@ -364,44 +426,44 @@ export namespace dialogflow_v2beta1 { /** * The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues. */ - responseId?: string; + responseId?: string | null; /** * Specifies the status of the webhook request. */ webhookStatus?: Schema$GoogleRpcStatus; } /** - * A document resource. Note: resource `projects.agent.knowledgeBases.documents` is deprecated, please use `projects.knowledgeBases.documents` instead. + * A document resource. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. */ export interface Schema$GoogleCloudDialogflowV2beta1Document { /** * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead. */ - content?: string; + content?: string | null; /** * The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs://<bucket-name>/<object-name>`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above. */ - contentUri?: string; + contentUri?: string | null; /** * Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. */ - displayName?: string; + displayName?: string | null; /** * Required. The knowledge type of document content. */ - knowledgeTypes?: string[]; + knowledgeTypes?: string[] | null; /** * Required. The MIME type of this document. */ - mimeType?: string; + mimeType?: string | null; /** * The document resource name. The name must be empty when creating a document. Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`. */ - name?: string; + name?: string | null; /** * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. */ - rawContent?: string; + rawContent?: string | null; } /** * Represents an entity type. Entity types serve as a tool for extracting parameter values from natural language queries. @@ -410,11 +472,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. Indicates whether the entity type can be automatically expanded. */ - autoExpansionMode?: string; + autoExpansionMode?: string | null; /** * Required. The name of the entity type. */ - displayName?: string; + displayName?: string | null; + /** + * Optional. Enables fuzzy entity extraction during classification. + */ + enableFuzzyExtraction?: boolean | null; /** * Optional. The collection of entity entries associated with the entity type. */ @@ -422,11 +488,11 @@ export namespace dialogflow_v2beta1 { /** * Required. Indicates the kind of entity type. */ - kind?: string; + kind?: string | null; /** * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. */ - name?: string; + name?: string | null; } /** * This message is a wrapper around a collection of entity types. @@ -444,28 +510,28 @@ export namespace dialogflow_v2beta1 { /** * Required. A collection of value synonyms. For example, if the entity type is *vegetable*, and `value` is *scallions*, a synonym could be *green onions*. For `KIND_LIST` entity types: * This collection must contain exactly one synonym equal to `value`. */ - synonyms?: string[]; + synonyms?: string[] | null; /** - * Required. The primary value associated with this entity entry. For example, if the entity type is *vegetable*, the value could be *scallions*. For `KIND_MAP` entity types: * A canonical value to be used in place of synonyms. For `KIND_LIST` entity types: * A string that can contain references to other entity types (with or without aliases). + * Required. The primary value associated with this entity entry. For example, if the entity type is *vegetable*, the value could be *scallions*. For `KIND_MAP` entity types: * A reference value to be used in place of synonyms. For `KIND_LIST` entity types: * A string that can contain references to other entity types (with or without aliases). */ - value?: string; + value?: string | null; } /** * Events allow for matching intents by event name instead of the natural language input. For instance, input `<event: { name: "welcome_event", parameters: { name: "Sam" } }>` can trigger a personalized welcome response. The parameter `name` may be used by the agent in the response: `"Hello #welcome_event.name! What can I do for you today?"`. */ export interface Schema$GoogleCloudDialogflowV2beta1EventInput { /** - * Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + * Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. */ - languageCode?: string; + languageCode?: string | null; /** * Required. The unique identifier of the event. */ - name?: string; + name?: string | null; /** - * Optional. The collection of parameters associated with the event. + * The collection of parameters associated with the event. */ - parameters?: {[key: string]: any}; + parameters?: {[key: string]: any} | null; } /** * The request message for Agents.ExportAgent. @@ -474,33 +540,101 @@ export namespace dialogflow_v2beta1 { /** * Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to export the agent to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If left unspecified, the serialized agent is returned inline. */ - agentUri?: string; + agentUri?: string | null; } /** * The response message for Agents.ExportAgent. */ export interface Schema$GoogleCloudDialogflowV2beta1ExportAgentResponse { /** - * The exported agent. Example for how to export an agent to a zip file via a command line: <pre>curl \ 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&gt;/agent:export'\ -X POST \ -H 'Authorization: Bearer '$(gcloud auth application-default print-access-token) \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --compressed \ --data-binary '{}' \ | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".x/\1/' \ | base64 --decode > &lt;agent zip file&gt;</pre> + * Zip compressed raw byte content for agent. */ - agentContent?: string; + agentContent?: string | null; /** * The URI to a file containing the exported agent. This field is populated only if `agent_uri` is specified in `ExportAgentRequest`. */ - agentUri?: string; + agentUri?: string | null; + } + /** + * Represents a fulfillment. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Fulfillment { + /** + * Optional. The human-readable name of the fulfillment, unique within the agent. + */ + displayName?: string | null; + /** + * Optional. Whether fulfillment is enabled. + */ + enabled?: boolean | null; + /** + * Optional. The field defines whether the fulfillment is enabled for certain features. + */ + features?: Schema$GoogleCloudDialogflowV2beta1FulfillmentFeature[]; + /** + * Configuration for a generic web service. + */ + genericWebService?: Schema$GoogleCloudDialogflowV2beta1FulfillmentGenericWebService; + /** + * Required. The unique identifier of the fulfillment. Format: `projects/<Project ID>/agent/fulfillment`. + */ + name?: string | null; + } + /** + * Whether fulfillment is enabled for the specific feature. + */ + export interface Schema$GoogleCloudDialogflowV2beta1FulfillmentFeature { + /** + * The type of the feature that enabled for fulfillment. + */ + type?: string | null; + } + /** + * Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. + */ + export interface Schema$GoogleCloudDialogflowV2beta1FulfillmentGenericWebService { + /** + * Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false. + */ + isCloudFunction?: boolean | null; + /** + * Optional. The password for HTTP Basic authentication. + */ + password?: string | null; + /** + * Optional. The HTTP request headers to send together with fulfillment requests. + */ + requestHeaders?: {[key: string]: string} | null; + /** + * Required. The fulfillment URI for receiving POST requests. + */ + uri?: string | null; + /** + * Optional. The user name for HTTP Basic authentication. + */ + username?: string | null; + } + /** + * Google Cloud Storage location for single input. + */ + export interface Schema$GoogleCloudDialogflowV2beta1GcsSource { + /** + * Required. The Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case. + */ + uri?: string | null; } /** * The request message for Agents.ImportAgent. */ export interface Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest { /** - * The agent to import. Example for how to import an agent via the command line: <pre>curl \ 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&gt;/agent:import\ -X POST \ -H 'Authorization: Bearer '$(gcloud auth application-default print-access-token) \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --compressed \ --data-binary "{ 'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)' }"</pre> + * Zip compressed raw byte content for agent. */ - agentContent?: string; + agentContent?: string | null; /** * The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". */ - agentUri?: string; + agentUri?: string | null; } /** * Instructs the speech recognizer on how to process the audio content. @@ -509,27 +643,39 @@ export namespace dialogflow_v2beta1 { /** * Required. Audio encoding of the audio content to process. */ - audioEncoding?: string; + audioEncoding?: string | null; /** - * Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + * Optional. If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information. */ - languageCode?: string; + enableWordInfo?: boolean | null; + /** + * Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + */ + languageCode?: string | null; /** * Optional. Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. */ - model?: string; + model?: string | null; /** * Optional. Which variant of the Speech model to use. */ - modelVariant?: string; + modelVariant?: string | null; /** - * Optional. The collection of phrase hints which are used to boost accuracy of speech recognition. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. + * Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. This field is deprecated. Please use [speech_contexts]() instead. If you specify both [phrase_hints]() and [speech_contexts](), Dialogflow will treat the [phrase_hints]() as a single additional [SpeechContext](). */ - phraseHints?: string[]; + phraseHints?: string[] | null; /** * Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details. */ - sampleRateHertz?: number; + sampleRateHertz?: number | null; + /** + * Optional. If `false` (default), recognition does not cease until the client closes the stream. If `true`, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance. + */ + singleUtterance?: boolean | null; + /** + * Optional. Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. + */ + speechContexts?: Schema$GoogleCloudDialogflowV2beta1SpeechContext[]; } /** * 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 sentence semantics. @@ -538,23 +684,23 @@ export namespace dialogflow_v2beta1 { /** * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. */ - action?: string; + action?: string | null; /** - * Optional. The list of platforms for which the first response will be taken from among the messages assigned to the DEFAULT_PLATFORM. + * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). */ - defaultResponsePlatforms?: string[]; + defaultResponsePlatforms?: string[] | null; /** * Required. The name of this intent. */ - displayName?: string; + displayName?: string | null; /** * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. */ - endInteraction?: boolean; + endInteraction?: boolean | null; /** * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. */ - events?: string[]; + events?: string[] | null; /** * Read-only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. */ @@ -562,11 +708,11 @@ export namespace dialogflow_v2beta1 { /** * Optional. The list of context names required for this intent to be triggered. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. */ - inputContextNames?: string[]; + inputContextNames?: string[] | null; /** * Optional. Indicates whether this is a fallback intent. */ - isFallback?: boolean; + isFallback?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ @@ -574,15 +720,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. */ - mlDisabled?: boolean; + mlDisabled?: boolean | null; /** * Optional. Indicates whether Machine Learning is enabled for the intent. Note: If `ml_enabled` setting is set to false, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. DEPRECATED! Please use `ml_disabled` field instead. NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, then the default value is determined as follows: - Before April 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled = true / ml_disabled = false. */ - mlEnabled?: boolean; + mlEnabled?: boolean | null; /** * The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - name?: string; + name?: string | null; /** * Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. */ @@ -594,19 +740,19 @@ export namespace dialogflow_v2beta1 { /** * Read-only after creation. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - parentFollowupIntentName?: string; + parentFollowupIntentName?: string | null; /** - * Optional. The priority of this intent. Higher numbers represent higher priorities. If this is zero or unspecified, we use the default priority 500000. Negative numbers mean that the intent is disabled. + * The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the `Normal` priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests. */ - priority?: number; + priority?: number | null; /** * Optional. Indicates whether to delete all contexts in the current session when this intent is matched. */ - resetContexts?: boolean; + resetContexts?: boolean | null; /** * Read-only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. We populate this field only in the output. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - rootFollowupIntentName?: string; + rootFollowupIntentName?: string | null; /** * Optional. The collection of examples that the agent is trained on. */ @@ -614,7 +760,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. Indicates whether webhooks are enabled for the intent. */ - webhookState?: string; + webhookState?: string | null; } /** * This message is a wrapper around a collection of intents. @@ -632,11 +778,11 @@ export namespace dialogflow_v2beta1 { /** * The unique identifier of the followup intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - followupIntentName?: string; + followupIntentName?: string | null; /** * The unique identifier of the followup intent's parent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - parentFollowupIntentName?: string; + parentFollowupIntentName?: string | null; } /** * Corresponds to the `Response` field in the Dialogflow console. @@ -646,6 +792,10 @@ export namespace dialogflow_v2beta1 { * Displays a basic card for Actions on Google. */ basicCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCard; + /** + * Browse carousel card for Actions on Google. + */ + browseCarouselCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard; /** * Displays a card. */ @@ -666,18 +816,34 @@ export namespace dialogflow_v2beta1 { * Displays a list card for Actions on Google. */ listSelect?: Schema$GoogleCloudDialogflowV2beta1IntentMessageListSelect; + /** + * The media content card for Actions on Google. + */ + mediaContent?: Schema$GoogleCloudDialogflowV2beta1IntentMessageMediaContent; /** * Returns a response containing a custom, platform-specific payload. See the Intent.Message.Platform type for a description of the structure that may be required for your platform. */ - payload?: {[key: string]: any}; + payload?: {[key: string]: any} | null; /** * Optional. The platform that this message is intended for. */ - platform?: string; + platform?: string | null; /** * Displays quick replies. */ quickReplies?: Schema$GoogleCloudDialogflowV2beta1IntentMessageQuickReplies; + /** + * Rich Business Messaging (RBM) carousel rich card response. + */ + rbmCarouselRichCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard; + /** + * Standalone Rich Business Messaging (RBM) rich card response. + */ + rbmStandaloneRichCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard; + /** + * Rich Business Messaging (RBM) text response. RBM allows businesses to send enriched and branded versions of SMS. See https://jibe.google.com/business-messaging. + */ + rbmText?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmText; /** * Returns a voice or text-only response for Actions on Google. */ @@ -686,6 +852,10 @@ export namespace dialogflow_v2beta1 { * Displays suggestion chips for Actions on Google. */ suggestions?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestions; + /** + * Table card for Actions on Google. + */ + tableCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageTableCard; /** * Plays audio from a file in Telephony Gateway. */ @@ -714,7 +884,7 @@ export namespace dialogflow_v2beta1 { /** * Required, unless image is present. The body text of the card. */ - formattedText?: string; + formattedText?: string | null; /** * Optional. The image for the card. */ @@ -722,11 +892,11 @@ export namespace dialogflow_v2beta1 { /** * Optional. The subtitle of the card. */ - subtitle?: string; + subtitle?: string | null; /** * Optional. The title of the card. */ - title?: string; + title?: string | null; } /** * The button object that appears at the bottom of a card. @@ -739,7 +909,7 @@ export namespace dialogflow_v2beta1 { /** * Required. The title of the button. */ - title?: string; + title?: string | null; } /** * Opens the given URI. @@ -748,7 +918,58 @@ export namespace dialogflow_v2beta1 { /** * Required. The HTTP or HTTPS scheme URI. */ - uri?: string; + uri?: string | null; + } + /** + * Browse Carousel Card for Actions on Google. https://developers.google.com/actions/assistant/responses#browsing_carousel + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard { + /** + * Optional. Settings for displaying the image. Applies to every image in items. + */ + imageDisplayOptions?: string | null; + /** + * Required. List of items in the Browse Carousel Card. Minimum of two items, maximum of ten. + */ + items?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem[]; + } + /** + * Browsing carousel tile + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem { + /** + * Optional. Description of the carousel item. Maximum of four lines of text. + */ + description?: string | null; + /** + * Optional. Text that appears at the bottom of the Browse Carousel Card. Maximum of one line of text. + */ + footer?: string | null; + /** + * Optional. Hero image for the carousel item. + */ + image?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; + /** + * Required. Action to present to the user. + */ + openUriAction?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction; + /** + * Required. Title of the carousel item. Maximum of two lines of text. + */ + title?: string | null; + } + /** + * Actions on Google action to open a given url. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction { + /** + * Required. URL + */ + url?: string | null; + /** + * Optional. Specifies the type of viewer that is used when opening the URL. Defaults to opening via web browser. + */ + urlTypeHint?: string | null; } /** * The card response message. @@ -761,15 +982,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. The public URI to an image file for the card. */ - imageUri?: string; + imageUri?: string | null; /** * Optional. The subtitle of the card. */ - subtitle?: string; + subtitle?: string | null; /** * Optional. The title of the card. */ - title?: string; + title?: string | null; } /** * Optional. Contains information about a button. @@ -778,11 +999,11 @@ export namespace dialogflow_v2beta1 { /** * Optional. The text to send back to the Dialogflow API or a URI to open. */ - postback?: string; + postback?: string | null; /** * Optional. The text to show on the button. */ - text?: string; + text?: string | null; } /** * The card for presenting a carousel of options to select from. @@ -800,7 +1021,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The body text of the card. */ - description?: string; + description?: string | null; /** * Optional. The image to display. */ @@ -812,7 +1033,20 @@ export namespace dialogflow_v2beta1 { /** * Required. Title of the carousel item. */ - title?: string; + title?: string | null; + } + /** + * Column properties for TableCard. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageColumnProperties { + /** + * Required. Column heading. + */ + header?: string | null; + /** + * Optional. Defines text alignment for all cells in this column. + */ + horizontalAlignment?: string | null; } /** * The image response message. @@ -821,11 +1055,11 @@ export namespace dialogflow_v2beta1 { /** * A text description of the image to be used for accessibility, e.g., screen readers. Required if image_uri is set for CarouselSelect. */ - accessibilityText?: string; + accessibilityText?: string | null; /** * Optional. The public URI to an image file. */ - imageUri?: string; + imageUri?: string | null; } /** * The suggestion chip message that allows the user to jump out to the app or website associated with this agent. @@ -834,11 +1068,11 @@ export namespace dialogflow_v2beta1 { /** * Required. The name of the app or site this chip is linking to. */ - destinationName?: string; + destinationName?: string | null; /** * Required. The URI of the app or site to open when the user taps the suggestion chip. */ - uri?: string; + uri?: string | null; } /** * The card for presenting a list of options to select from. @@ -848,10 +1082,14 @@ export namespace dialogflow_v2beta1 { * Required. List items. */ items?: Schema$GoogleCloudDialogflowV2beta1IntentMessageListSelectItem[]; + /** + * Optional. Subtitle of the list. + */ + subtitle?: string | null; /** * Optional. The overall title of the list. */ - title?: string; + title?: string | null; } /** * An item in the list. @@ -860,7 +1098,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The main text describing the item. */ - description?: string; + description?: string | null; /** * Optional. The image to display. */ @@ -872,243 +1110,490 @@ export namespace dialogflow_v2beta1 { /** * Required. The title of the list item. */ - title?: string; + title?: string | null; } /** - * The quick replies response message. + * The media content card for Actions on Google. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageQuickReplies { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageMediaContent { /** - * Optional. The collection of quick replies. + * Required. List of media objects. */ - quickReplies?: string[]; + mediaObjects?: Schema$GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject[]; /** - * Optional. The title of the collection of quick replies. + * Optional. What type of media is the content (ie "audio"). */ - title?: string; + mediaType?: string | null; } /** - * Additional info about the select item for when it is triggered in a dialog. + * Response media object for media content card. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject { /** - * Required. A unique key that will be sent back to the agent if this response is given. + * Required. Url where the media is stored. */ - key?: string; + contentUrl?: string | null; /** - * Optional. A list of synonyms that can also be used to trigger this item in dialog. + * Optional. Description of media card. */ - synonyms?: string[]; - } - /** - * The simple response message containing speech or text. - */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse { + description?: string | null; /** - * Optional. The text to display. + * Optional. Icon to display above media content. */ - displayText?: string; + icon?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; /** - * One of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text_to_speech. + * Optional. Image to display above media content. */ - ssml?: string; + largeImage?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; /** - * One of text_to_speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml. + * Required. Name of media card. */ - textToSpeech?: string; + name?: string | null; } /** - * The collection of simple response candidates. This message in `QueryResult.fulfillment_messages` and `WebhookResponse.fulfillment_messages` should contain only one `SimpleResponse`. + * The quick replies response message. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageQuickReplies { /** - * Required. The list of simple responses. + * Optional. The collection of quick replies. */ - simpleResponses?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse[]; - } - /** - * The suggestion chip message that the user can tap to quickly post a reply to the conversation. - */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestion { + quickReplies?: string[] | null; /** - * Required. The text shown the in the suggestion chip. + * Optional. The title of the collection of quick replies. */ - title?: string; + title?: string | null; } /** - * The collection of suggestions. + * Rich Business Messaging (RBM) Card content */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestions { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent { /** - * Required. The list of suggested replies. + * Optional. Description of the card (at most 2000 bytes). At least one of the title, description or media must be set. */ - suggestions?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestion[]; - } - /** - * Plays audio from a file in Telephony Gateway. - */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio { + description?: string | null; /** - * Required. URI to a Google Cloud Storage object containing the audio to play, e.g., "gs://bucket/object". The object must contain a single channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. This object must be readable by the `service-<Project Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service account where <Project Number> is the number of the Telephony Gateway project (usually the same as the Dialogflow agent project). If the Google Cloud Storage bucket is in the Telephony Gateway project, this permission is added by default when enabling the Dialogflow V2 API. For audio from other sources, consider using the `TelephonySynthesizeSpeech` message with SSML. + * Optional. However at least one of the title, description or media must be set. Media (image, GIF or a video) to include in the card. */ - audioUri?: string; - } - /** - * Synthesizes speech and plays back the synthesized audio to the caller in Telephony Gateway. Telephony Gateway takes the synthesizer settings from `DetectIntentResponse.output_audio_config` which can either be set at request-level or can come from the agent-level synthesizer config. - */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech { + media?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia; /** - * The SSML to be synthesized. For more information, see [SSML](https://developers.google.com/actions/reference/ssml). + * Optional. List of suggestions to include in the card. */ - ssml?: string; + suggestions?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion[]; /** - * The raw text to be synthesized. + * Optional. Title of the card (at most 200 bytes). At least one of the title, description or media must be set. */ - text?: string; + title?: string | null; } /** - * Transfers the call in Telephony Gateway. + * Rich Business Messaging (RBM) Media displayed in Cards The following media-types are currently supported: ## Image Types image/jpeg image/jpg' image/gif image/png ## Video Types video/h263 video/m4v video/mp4 video/mpeg video/mpeg4 video/webm */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia { /** - * Required. The phone number to transfer the call to in [E.164 format](https://en.wikipedia.org/wiki/E.164). We currently only allow transferring to US numbers (+1xxxyyyzzzz). + * Required. Publicly reachable URI of the file. The RBM platform determines the MIME type of the file from the content-type field in the HTTP headers when the platform fetches the file. The content-type field must be present and accurate in the HTTP response from the URL. + */ + fileUri?: string | null; + /** + * Required for cards with vertical orientation. The height of the media within a rich card with a vertical layout. (https://goo.gl/NeFCjz). For a standalone card with horizontal layout, height is not customizable, and this field is ignored. + */ + height?: string | null; + /** + * Optional. Publicly reachable URI of the thumbnail.If you don't provide a thumbnail URI, the RBM platform displays a blank placeholder thumbnail until the user's device downloads the file. Depending on the user's setting, the file may not download automatically and may require the user to tap a download button. */ - phoneNumber?: string; + thumbnailUri?: string | null; } /** - * The text response message. + * Carousel Rich Business Messaging (RBM) rich card. Rich cards allow you to respond to users with more vivid content, e.g. with media and suggestions. For more details about RBM rich cards, please see: https://developers.google.com/rcs-business-messaging/rbm/guides/build/send-messages#rich-cards. If you want to show a single card with more control over the layout, please use RbmStandaloneCard instead. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageText { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard { /** - * Optional. The collection of the agent's responses. + * Required. The cards in the carousel. A carousel must have at least 2 cards and at most 10. */ - text?: string[]; + cardContents?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent[]; + /** + * Required. The width of the cards in the carousel. + */ + cardWidth?: string | null; } /** - * Represents intent parameters. + * Standalone Rich Business Messaging (RBM) rich card. Rich cards allow you to respond to users with more vivid content, e.g. with media and suggestions. For more details about RBM rich cards, please see: https://developers.google.com/rcs-business-messaging/rbm/guides/build/send-messages#rich-cards. You can group multiple rich cards into one using RbmCarouselCard but carousel cards will give you less control over the card layout. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentParameter { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard { /** - * Optional. The default value to use when the `value` yields an empty result. Default values can be extracted from contexts by using the following syntax: `#context_name.parameter_name`. + * Required. Card content. */ - defaultValue?: string; + cardContent?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent; /** - * Required. The name of the parameter. + * Required. Orientation of the card. */ - displayName?: string; + cardOrientation?: string | null; /** - * Optional. The name of the entity type, prefixed with `@`, that describes values of the parameter. If the parameter is required, this must be provided. + * Required if orientation is horizontal. Image preview alignment for standalone cards with horizontal layout. */ - entityTypeDisplayName?: string; + thumbnailImageAlignment?: string | null; + } + /** + * Rich Business Messaging (RBM) suggested client-side action that the user can choose from the card. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction { /** - * Optional. Indicates whether the parameter represents a list of values. + * Suggested client side action: Dial a phone number */ - isList?: boolean; + dial?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial; /** - * Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value. + * Suggested client side action: Open a URI on device */ - mandatory?: boolean; + openUrl?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri; /** - * The unique identifier of this parameter. + * Opaque payload that the Dialogflow receives in a user event when the user taps the suggested action. This data will be also forwarded to webhook to allow performing custom business logic. */ - name?: string; + postbackData?: string | null; /** - * Optional. The collection of prompts that the agent can present to the user in order to collect value for the parameter. + * Suggested client side action: Share user location */ - prompts?: string[]; + shareLocation?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation; /** - * Optional. The definition of the parameter value. It can be: - a constant string, - a parameter value defined as `$parameter_name`, - an original parameter value defined as `$parameter_name.original`, - a parameter value from some context defined as `#context_name.parameter_name`. + * Text to display alongside the action. */ - value?: string; + text?: string | null; } /** - * Represents an example that the agent is trained on. + * Opens the user's default dialer app with the specified phone number but does not dial automatically (https://goo.gl/ergbB2). */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrase { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial { /** - * Output only. The unique identifier of this training phrase. + * Required. The phone number to fill in the default dialer app. This field should be in [E.164](https://en.wikipedia.org/wiki/E.164) format. An example of a correctly formatted phone number: +15556767888. */ - name?: string; + phoneNumber?: string | null; + } + /** + * Opens the user's default web browser app to the specified uri (https://goo.gl/6GLJD2). If the user has an app installed that is registered as the default handler for the URL, then this app will be opened instead, and its icon will be used in the suggested action UI. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri { /** - * Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `entity_type`, `alias`, and `user_defined` fields are all set. + * Required. The uri to open on the user device */ - parts?: Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart[]; + uri?: string | null; + } + /** + * Opens the device's location chooser so the user can pick a location to send back to the agent (https://goo.gl/GXotJW). + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation {} + /** + * Rich Business Messaging (RBM) suggested reply that the user can click instead of typing in their own response. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply { /** - * Optional. Indicates how many times this example was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased. + * Opaque payload that the Dialogflow receives in a user event when the user taps the suggested reply. This data will be also forwarded to webhook to allow performing custom business logic. */ - timesAddedCount?: number; + postbackData?: string | null; /** - * Required. The type of the training phrase. + * Suggested reply text. */ - type?: string; + text?: string | null; } /** - * Represents a part of a training phrase. + * Rich Business Messaging (RBM) suggestion. Suggestions allow user to easily select/click a predefined response or perform an action (like opening a web uri). */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion { /** - * Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase. + * Predefined client side actions that user can choose */ - alias?: string; + action?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction; /** - * Optional. The entity type name prefixed with `@`. This field is required for annotated parts of the training phrase. + * Predefined replies for user to select instead of typing */ - entityType?: string; + reply?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply; + } + /** + * Rich Business Messaging (RBM) text response with suggestions. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmText { /** - * Required. The text for this part. + * Optional. One or more suggestions to show to the user. */ - text?: string; + rbmSuggestion?: Schema$GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion[]; /** - * Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true. + * Required. Text sent and displayed to the user. */ - userDefined?: boolean; + text?: string | null; } /** - * Represents the result of querying a Knowledge base. + * Additional info about the select item for when it is triggered in a dialog. */ - export interface Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswers { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo { /** - * A list of answers from Knowledge Connector. + * Required. A unique key that will be sent back to the agent if this response is given. */ - answers?: Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer[]; + key?: string | null; + /** + * Optional. A list of synonyms that can also be used to trigger this item in dialog. + */ + synonyms?: string[] | null; } /** - * An answer from Knowledge Connector. + * The simple response message containing speech or text. */ - export interface Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer { + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse { /** - * The piece of text from the `source` knowledge base document that answers this conversational query. + * Optional. The text to display. */ - answer?: string; + displayText?: string | null; + /** + * One of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text_to_speech. + */ + ssml?: string | null; + /** + * One of text_to_speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml. + */ + textToSpeech?: string | null; + } + /** + * The collection of simple response candidates. This message in `QueryResult.fulfillment_messages` and `WebhookResponse.fulfillment_messages` should contain only one `SimpleResponse`. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses { + /** + * Required. The list of simple responses. + */ + simpleResponses?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse[]; + } + /** + * The suggestion chip message that the user can tap to quickly post a reply to the conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestion { + /** + * Required. The text shown the in the suggestion chip. + */ + title?: string | null; + } + /** + * The collection of suggestions. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestions { + /** + * Required. The list of suggested replies. + */ + suggestions?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestion[]; + } + /** + * Table card for Actions on Google. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTableCard { + /** + * Optional. List of buttons for the card. + */ + buttons?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton[]; + /** + * Optional. Display properties for the columns in this table. + */ + columnProperties?: Schema$GoogleCloudDialogflowV2beta1IntentMessageColumnProperties[]; + /** + * Optional. Image which should be displayed on the card. + */ + image?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; + /** + * Optional. Rows in this table of data. + */ + rows?: Schema$GoogleCloudDialogflowV2beta1IntentMessageTableCardRow[]; + /** + * Optional. Subtitle to the title. + */ + subtitle?: string | null; + /** + * Required. Title of the card. + */ + title?: string | null; + } + /** + * Cell of TableCardRow. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTableCardCell { + /** + * Required. Text in this cell. + */ + text?: string | null; + } + /** + * Row of TableCard. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTableCardRow { + /** + * Optional. List of cells that make up this row. + */ + cells?: Schema$GoogleCloudDialogflowV2beta1IntentMessageTableCardCell[]; + /** + * Optional. Whether to add a visual divider after this row. + */ + dividerAfter?: boolean | null; + } + /** + * Plays audio from a file in Telephony Gateway. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio { + /** + * Required. URI to a Google Cloud Storage object containing the audio to play, e.g., "gs://bucket/object". The object must contain a single channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. This object must be readable by the `service-<Project Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service account where <Project Number> is the number of the Telephony Gateway project (usually the same as the Dialogflow agent project). If the Google Cloud Storage bucket is in the Telephony Gateway project, this permission is added by default when enabling the Dialogflow V2 API. For audio from other sources, consider using the `TelephonySynthesizeSpeech` message with SSML. + */ + audioUri?: string | null; + } + /** + * Synthesizes speech and plays back the synthesized audio to the caller in Telephony Gateway. Telephony Gateway takes the synthesizer settings from `DetectIntentResponse.output_audio_config` which can either be set at request-level or can come from the agent-level synthesizer config. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech { + /** + * The SSML to be synthesized. For more information, see [SSML](https://developers.google.com/actions/reference/ssml). + */ + ssml?: string | null; + /** + * The raw text to be synthesized. + */ + text?: string | null; + } + /** + * Transfers the call in Telephony Gateway. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall { + /** + * Required. The phone number to transfer the call to in [E.164 format](https://en.wikipedia.org/wiki/E.164). We currently only allow transferring to US numbers (+1xxxyyyzzzz). + */ + phoneNumber?: string | null; + } + /** + * The text response message. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessageText { + /** + * Optional. The collection of the agent's responses. + */ + text?: string[] | null; + } + /** + * Represents intent parameters. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentParameter { + /** + * Optional. The default value to use when the `value` yields an empty result. Default values can be extracted from contexts by using the following syntax: `#context_name.parameter_name`. + */ + defaultValue?: string | null; + /** + * Required. The name of the parameter. + */ + displayName?: string | null; + /** + * Optional. The name of the entity type, prefixed with `@`, that describes values of the parameter. If the parameter is required, this must be provided. + */ + entityTypeDisplayName?: string | null; + /** + * Optional. Indicates whether the parameter represents a list of values. + */ + isList?: boolean | null; + /** + * Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value. + */ + mandatory?: boolean | null; + /** + * The unique identifier of this parameter. + */ + name?: string | null; + /** + * Optional. The collection of prompts that the agent can present to the user in order to collect a value for the parameter. + */ + prompts?: string[] | null; + /** + * Optional. The definition of the parameter value. It can be: - a constant string, - a parameter value defined as `$parameter_name`, - an original parameter value defined as `$parameter_name.original`, - a parameter value from some context defined as `#context_name.parameter_name`. + */ + value?: string | null; + } + /** + * Represents an example that the agent is trained on. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrase { + /** + * Output only. The unique identifier of this training phrase. + */ + name?: string | null; + /** + * Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `entity_type`, `alias`, and `user_defined` fields are all set. + */ + parts?: Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart[]; + /** + * Optional. Indicates how many times this example was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased. + */ + timesAddedCount?: number | null; + /** + * Required. The type of the training phrase. + */ + type?: string | null; + } + /** + * Represents a part of a training phrase. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart { + /** + * Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase. + */ + alias?: string | null; + /** + * Optional. The entity type name prefixed with `@`. This field is required for annotated parts of the training phrase. + */ + entityType?: string | null; + /** + * Required. The text for this part. + */ + text?: string | null; + /** + * Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true. + */ + userDefined?: boolean | null; + } + /** + * Represents the result of querying a Knowledge base. + */ + export interface Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswers { + /** + * A list of answers from Knowledge Connector. + */ + answers?: Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer[]; + } + /** + * An answer from Knowledge Connector. + */ + export interface Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer { + /** + * The piece of text from the `source` knowledge base document that answers this conversational query. + */ + answer?: string | null; /** * The corresponding FAQ question if the answer was extracted from a FAQ Document, empty otherwise. */ - faqQuestion?: string; + faqQuestion?: string | null; /** * The system's confidence score that this Knowledge answer is a good match for this conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain). Note: The confidence score is likely to vary somewhat (possibly even for identical requests), as the underlying model is under constant improvement. It may be deprecated in the future. We recommend using `match_confidence_level` which should be generally more stable. */ - matchConfidence?: number; + matchConfidence?: number | null; /** * The system's confidence level that this knowledge answer is a good match for this conversational query. NOTE: The confidence level for a given `<query, answer>` pair may change without notice, as it depends on models that are constantly being improved. However, it will change less frequently than the confidence score below, and should be preferred for referencing the quality of an answer. */ - matchConfidenceLevel?: string; + matchConfidenceLevel?: string | null; /** * Indicates which Knowledge Document this answer was extracted from. Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`. */ - source?: string; + source?: string | null; } /** - * Represents knowledge base resource. Note: resource `projects.agent.knowledgeBases` is deprecated, please use `projects.knowledgeBases` instead. + * Represents knowledge base resource. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. */ export interface Schema$GoogleCloudDialogflowV2beta1KnowledgeBase { /** * Required. The display name of the knowledge base. The name must be 1024 bytes or less; otherwise, the creation request fails. */ - displayName?: string; + displayName?: string | null; + /** + * Language which represents the KnowledgeBase. When the KnowledgeBase is created/updated, this is populated for all non en-us languages. If not populated, the default language en-us applies. + */ + languageCode?: string | null; /** * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. */ - name?: string; + name?: string | null; } /** * Metadata in google::longrunning::Operation for Knowledge operations. @@ -1117,7 +1602,16 @@ export namespace dialogflow_v2beta1 { /** * Required. The current state of this operation. */ - state?: string; + state?: string | null; + } + /** + * The response for ConversationDatasets.LabelConversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1LabelConversationResponse { + /** + * New annotated conversation dataset created by the labeling task. + */ + annotatedConversationDataset?: Schema$GoogleCloudDialogflowV2beta1AnnotatedConversationDataset; } /** * The response message for Contexts.ListContexts. @@ -1130,7 +1624,7 @@ export namespace dialogflow_v2beta1 { /** * Token to retrieve the next page of results, or empty if there are no more results in the list. */ - nextPageToken?: string; + nextPageToken?: string | null; } /** * Response message for Documents.ListDocuments. @@ -1143,7 +1637,7 @@ export namespace dialogflow_v2beta1 { /** * Token to retrieve the next page of results, or empty if there are no more results in the list. */ - nextPageToken?: string; + nextPageToken?: string | null; } /** * The response message for EntityTypes.ListEntityTypes. @@ -1156,7 +1650,7 @@ export namespace dialogflow_v2beta1 { /** * Token to retrieve the next page of results, or empty if there are no more results in the list. */ - nextPageToken?: string; + nextPageToken?: string | null; } /** * The response message for Intents.ListIntents. @@ -1169,7 +1663,7 @@ export namespace dialogflow_v2beta1 { /** * Token to retrieve the next page of results, or empty if there are no more results in the list. */ - nextPageToken?: string; + nextPageToken?: string | null; } /** * Response message for KnowledgeBases.ListKnowledgeBases. @@ -1182,7 +1676,7 @@ export namespace dialogflow_v2beta1 { /** * Token to retrieve the next page of results, or empty if there are no more results in the list. */ - nextPageToken?: string; + nextPageToken?: string | null; } /** * The response message for SessionEntityTypes.ListSessionEntityTypes. @@ -1191,7 +1685,7 @@ export namespace dialogflow_v2beta1 { /** * Token to retrieve the next page of results, or empty if there are no more results in the list. */ - nextPageToken?: string; + nextPageToken?: string | null; /** * The list of session entity types. There will be a maximum number of items returned based on the page_size field in the request. */ @@ -1204,35 +1698,35 @@ export namespace dialogflow_v2beta1 { /** * Optional. This field is set to the value of the `QueryParameters.payload` field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular for the Telephony Gateway this field has the form: <pre>{ "telephony": { "caller_id": "+18558363987" } }</pre> Note: The caller ID field (`caller_id`) will be redacted for Standard Edition agents and populated with the caller ID in [E.164 format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. */ - payload?: {[key: string]: any}; + payload?: {[key: string]: any} | null; /** * The source of this request, e.g., `google`, `facebook`, `slack`. It is set by Dialogflow-owned servers. */ - source?: string; + source?: string | null; /** * Optional. The version of the protocol used for this request. This field is AoG-specific. */ - version?: string; + version?: string | null; } /** - * Instructs the speech synthesizer how to generate the output audio content. + * Instructs the speech synthesizer how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent. */ export interface Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig { /** * Required. Audio encoding of the synthesized audio content. */ - audioEncoding?: string; + audioEncoding?: string | null; /** - * Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality). + * The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality). */ - sampleRateHertz?: number; + sampleRateHertz?: number | null; /** - * Optional. Configuration of how speech should be synthesized. + * Configuration of how speech should be synthesized. */ synthesizeSpeechConfig?: Schema$GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig; } /** - * Represents the query input. It can contain either: 1. An audio config which instructs the speech recognizer how to process the speech audio. 2. A conversational query in the form of text,. 3. An event that specifies which intent to trigger. + * Represents the query input. It can contain either: 1. An audio config which instructs the speech recognizer how to process the speech audio. 2. A conversational query in the form of text. 3. An event that specifies which intent to trigger. */ export interface Schema$GoogleCloudDialogflowV2beta1QueryInput { /** @@ -1253,37 +1747,45 @@ export namespace dialogflow_v2beta1 { */ export interface Schema$GoogleCloudDialogflowV2beta1QueryParameters { /** - * Optional. The collection of contexts to be activated before this query is executed. + * The collection of contexts to be activated before this query is executed. */ contexts?: Schema$GoogleCloudDialogflowV2beta1Context[]; /** - * Optional. The geo location of this conversational query. + * The geo location of this conversational query. */ geoLocation?: Schema$GoogleTypeLatLng; /** - * Optional. KnowledgeBases to get alternative results from. If not set, the KnowledgeBases enabled in the agent (through UI) will be used. Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. + * KnowledgeBases to get alternative results from. If not set, the KnowledgeBases enabled in the agent (through UI) will be used. Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. */ - knowledgeBaseNames?: string[]; + knowledgeBaseNames?: string[] | null; /** - * Optional. This field can be used to pass custom data into the webhook associated with the agent. Arbitrary JSON objects are supported. + * This field can be used to pass custom data into the webhook associated with the agent. Arbitrary JSON objects are supported. */ - payload?: {[key: string]: any}; + payload?: {[key: string]: any} | null; /** - * Optional. Specifies whether to delete all contexts in the current session before the new ones are activated. + * Specifies whether to delete all contexts in the current session before the new ones are activated. */ - resetContexts?: boolean; + resetContexts?: boolean | null; /** - * Optional. Configures the type of sentiment analysis to perform. If not provided, sentiment analysis is not performed. Note: Sentiment Analysis is only currently available for Enterprise Edition agents. + * Configures the type of sentiment analysis to perform. If not provided, sentiment analysis is not performed. Note: Sentiment Analysis is only currently available for Enterprise Edition agents. */ sentimentAnalysisRequestConfig?: Schema$GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig; /** - * 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. + * 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[]; /** - * Optional. The time zone of this conversational query from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. If not provided, the time zone specified in agent settings is used. + * For mega agent query, directly specify which sub agents to query. If any specified sub agent is not linked to the mega agent, an error will be returned. If empty, Dialogflow will decide which sub agents to query. If specified for a non-mega-agent query, will be silently ignored. */ - timeZone?: string; + subAgents?: Schema$GoogleCloudDialogflowV2beta1SubAgent[]; + /** + * The time zone of this conversational query from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. If not provided, the time zone specified in agent settings is used. + */ + timeZone?: string | null; + /** + * This field can be used to pass HTTP headers for a webhook call. These headers will be sent to webhook alone with the headers that have been configured through Dialogflow web console. The headers defined within this field will overwrite the headers configured through Dialogflow console if there is a conflict. Header names are case-insensitive. Google's specified headers are not allowed. Including: "Host", "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc. + */ + webhookHeaders?: {[key: string]: string} | null; } /** * Represents the result of conversational query or event processing. @@ -1292,15 +1794,15 @@ export namespace dialogflow_v2beta1 { /** * The action name from the matched intent. */ - action?: string; + action?: string | null; /** - * This field is set to: - `false` if the matched intent has required parameters and not all of the required parameter values have been collected. - `true` if all required parameter values have been collected, or if the matched intent doesn't contain any required parameters. + * This field is set to: - `false` if the matched intent has required parameters and not all of the required parameter values have been collected. - `true` if all required parameter values have been collected, or if the matched intent doesn't contain any required parameters. */ - allRequiredParamsPresent?: boolean; + allRequiredParamsPresent?: boolean | null; /** - * The free-form diagnostic info. For example, this field could contain webhook call latency. The string keys of the Struct's fields map can change without notice. + * Free-form diagnostic information for the associated detect intent request. The fields of this data can change without notice, so you should not write code that depends on its structure. The data may contain: - webhook call latency - webhook errors */ - diagnosticInfo?: {[key: string]: any}; + diagnosticInfo?: {[key: string]: any} | null; /** * The collection of rich messages to present to the user. */ @@ -1308,23 +1810,23 @@ export namespace dialogflow_v2beta1 { /** * The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, `fulfillment_messages` should be preferred. */ - fulfillmentText?: string; + fulfillmentText?: string | null; /** - * The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: `name`, `display_name` and `webhook_state`. + * The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: `name`, `display_name`, `end_interaction` and `is_fallback`. */ intent?: Schema$GoogleCloudDialogflowV2beta1Intent; /** - * The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). If there are `multiple knowledge_answers` messages, this value is set to the greatest `knowledgeAnswers.match_confidence` value in the list. + * The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. If there are `multiple knowledge_answers` messages, this value is set to the greatest `knowledgeAnswers.match_confidence` value in the list. */ - intentDetectionConfidence?: number; + intentDetectionConfidence?: number | null; /** * The result from Knowledge Connector (if any), ordered by decreasing `KnowledgeAnswers.match_confidence`. */ knowledgeAnswers?: Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswers; /** - * The language that was triggered during intent detection. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. + * The language that was triggered during intent detection. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. */ - languageCode?: string; + languageCode?: string | null; /** * The collection of output contexts. If applicable, `output_contexts.parameters` contains entries with name `<parameter name>.original` containing the original parameter values before the query. */ @@ -1332,11 +1834,11 @@ export namespace dialogflow_v2beta1 { /** * The collection of extracted parameters. */ - parameters?: {[key: string]: any}; + parameters?: {[key: string]: any} | null; /** - * The original conversational query text: - If natural language text was provided as input, `query_text` contains a copy of the input. - If natural language speech audio was provided as input, `query_text` contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked. - If an event was provided as input, `query_text` is not set. + * The original conversational query text: - If natural language text was provided as input, `query_text` contains a copy of the input. - If natural language speech audio was provided as input, `query_text` contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked. - If automatic spell correction is enabled, `query_text` will contain the corrected user input. */ - queryText?: string; + queryText?: string | null; /** * The sentiment analysis result, which depends on the `sentiment_analysis_request_config` specified in the request. */ @@ -1344,32 +1846,37 @@ export namespace dialogflow_v2beta1 { /** * The Speech recognition confidence between 0.0 and 1.0. 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 not guaranteed to be accurate or set. In particular this field isn't set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult. */ - speechRecognitionConfidence?: number; + speechRecognitionConfidence?: number | null; /** * If the query was fulfilled by a webhook call, this field is set to the value of the `payload` field returned in the webhook response. */ - webhookPayload?: {[key: string]: any}; + webhookPayload?: {[key: string]: any} | null; /** * If the query was fulfilled by a webhook call, this field is set to the value of the `source` field returned in the webhook response. */ - webhookSource?: string; + webhookSource?: string | null; } /** * Request message for Documents.ReloadDocument. */ - export interface Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest {} + export interface Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest { + /** + * The path of gcs source file for reloading document content. + */ + gcsSource?: Schema$GoogleCloudDialogflowV2beta1GcsSource; + } /** * The request message for Agents.RestoreAgent. */ export interface Schema$GoogleCloudDialogflowV2beta1RestoreAgentRequest { /** - * The agent to restore. Example for how to restore an agent via the command line: <pre>curl \ 'https://dialogflow.googleapis.com/v2beta1/projects/&lt;project_name&gt;/agent:restore\ -X POST \ -H 'Authorization: Bearer '$(gcloud auth application-default print-access-token) \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --compressed \ --data-binary "{ 'agentContent': '$(cat &lt;agent zip file&gt; | base64 -w 0)' }"</pre> + * Zip compressed raw byte content for agent. */ - agentContent?: string; + agentContent?: string | null; /** * The URI to a Google Cloud Storage file containing the agent to restore. Note: The URI must start with "gs://". */ - agentUri?: string; + agentUri?: string | null; } /** * The response message for Agents.SearchAgents. @@ -1382,7 +1889,7 @@ export namespace dialogflow_v2beta1 { /** * Token to retrieve the next page of results, or empty if there are no more results in the list. */ - nextPageToken?: string; + nextPageToken?: string | null; } /** * The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. @@ -1391,20 +1898,20 @@ export namespace dialogflow_v2beta1 { /** * A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative). */ - magnitude?: number; + magnitude?: number | null; /** * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). */ - score?: number; + score?: number | null; } /** * Configures the types of sentiment analysis to perform. */ export interface Schema$GoogleCloudDialogflowV2beta1SentimentAnalysisRequestConfig { /** - * Optional. Instructs the service to perform sentiment analysis on `query_text`. If not provided, sentiment analysis is not performed on `query_text`. + * Instructs the service to perform sentiment analysis on `query_text`. If not provided, sentiment analysis is not performed on `query_text`. */ - analyzeQueryTextSentiment?: boolean; + analyzeQueryTextSentiment?: boolean | null; } /** * The result of sentiment analysis as configured by `sentiment_analysis_request_config`. @@ -1416,7 +1923,7 @@ export namespace dialogflow_v2beta1 { queryTextSentiment?: Schema$GoogleCloudDialogflowV2beta1Sentiment; } /** - * Represents a session entity type. Extends or replaces a developer entity type at the user session level (we refer to the entity types defined at the agent level as "developer entity types"). Note: session entity types apply to all queries, regardless of the language. + * Represents a session entity type. Extends or replaces a custom entity type at the user session level (we refer to the entity types defined at the agent level as "custom entity types"). Note: session entity types apply to all queries, regardless of the language. */ export interface Schema$GoogleCloudDialogflowV2beta1SessionEntityType { /** @@ -1424,13 +1931,39 @@ export namespace dialogflow_v2beta1 { */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** - * Required. Indicates whether the additional data should override or supplement the developer entity type definition. + * Required. Indicates whether the additional data should override or supplement the custom entity type definition. */ - entityOverrideMode?: string; + entityOverrideMode?: string | null; /** * Required. The unique identifier of this session entity type. Format: `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`, or `projects/<Project ID>/agent/environments/<Environment 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. `<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; + name?: string | null; + } + /** + * Hints for the speech recognizer to help with recognition in a specific conversation state. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SpeechContext { + /** + * Optional. Boost for this context compared to other contexts: * If the boost is positive, Dialogflow will increase the probability that the phrases in this context are recognized over similar sounding phrases. * If the boost is unspecified or non-positive, Dialogflow will not apply any boost. Dialogflow recommends that you use boosts in the range (0, 20] and that you find a value that fits your use case with binary search. + */ + boost?: number | null; + /** + * Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. This list can be used to: * improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent * add additional words to the speech recognizer vocabulary * ... See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/quotas) for usage limits. + */ + phrases?: string[] | null; + } + /** + * Contains basic configuration for a sub-agent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SubAgent { + /** + * Optional. The unique identifier (`environment name` in dialogflow console) of this sub-agent environment. Assumes draft environment if `environment` is not set. + */ + environment?: string | null; + /** + * Required. The project of this agent. Format: `projects/<Project ID>`. + */ + project?: string | null; } /** * Configuration of how speech should be synthesized. @@ -1439,15 +1972,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. */ - effectsProfileId?: string[]; + effectsProfileId?: string[] | null; /** * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch. */ - pitch?: number; + pitch?: number | null; /** * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error. */ - speakingRate?: number; + speakingRate?: number | null; /** * Optional. The desired voice of the synthesized audio. */ @@ -1455,37 +1988,63 @@ export namespace dialogflow_v2beta1 { /** * Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that. */ - volumeGainDb?: number; + volumeGainDb?: number | null; } /** * Represents the natural language text to be processed. */ export interface Schema$GoogleCloudDialogflowV2beta1TextInput { /** - * Required. The language of this conversational query. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + * Required. The language of this conversational query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. */ - languageCode?: string; + languageCode?: string | null; /** * Required. The UTF-8 encoded natural language text to be processed. Text length must not exceed 256 characters. */ - text?: string; + text?: string | null; } /** * The request message for Agents.TrainAgent. */ export interface Schema$GoogleCloudDialogflowV2beta1TrainAgentRequest {} + /** + * Represents a single validation error. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ValidationError { + /** + * The names of the entries that the error is associated with. Format: - "projects/<Project ID>/agent", if the error is associated with the entire agent. - "projects/<Project ID>/agent/intents/<Intent ID>", if the error is associated with certain intents. - "projects/<Project ID>/agent/intents/<Intent Id>/trainingPhrases/<Training Phrase ID>", if the error is associated with certain intent training phrases. - "projects/<Project ID>/agent/intents/<Intent Id>/parameters/<Parameter ID>", if the error is associated with certain intent parameters. - "projects/<Project ID>/agent/entities/<Entity ID>", if the error is associated with certain entities. + */ + entries?: string[] | null; + /** + * The detailed error messsage. + */ + errorMessage?: string | null; + /** + * The severity of the error. + */ + severity?: string | null; + } + /** + * Represents the output of agent validation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ValidationResult { + /** + * Contains all validation errors. + */ + validationErrors?: Schema$GoogleCloudDialogflowV2beta1ValidationError[]; + } /** * Description of which voice to use for speech synthesis. */ export interface Schema$GoogleCloudDialogflowV2beta1VoiceSelectionParams { /** - * Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender. + * Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender. */ - name?: string; + name?: string | null; /** * Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request. */ - ssmlGender?: string; + ssmlGender?: string | null; } /** * The request message for a webhook call. @@ -1506,22 +2065,22 @@ export namespace dialogflow_v2beta1 { /** * The unique identifier of the response. Contains the same value as `[Streaming]DetectIntentResponse.response_id`. */ - responseId?: string; + responseId?: string | null; /** * The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>`. */ - session?: string; + session?: string | null; } /** - * The response message for a webhook call. + * The response message for a webhook call. This response is validated by the Dialogflow server. If validation fails, an error will be returned in the QueryResult.diagnostic_info field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error: - Use `""` for empty strings - Use `{}` or `null` for empty objects - Use `[]` or `null` for empty arrays For more information, see the [Protocol Buffers Language Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). */ export interface Schema$GoogleCloudDialogflowV2beta1WebhookResponse { /** * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. */ - endInteraction?: boolean; + endInteraction?: boolean | null; /** - * Optional. Makes the platform immediately invoke another `DetectIntent` call internally with the specified event as input. + * Optional. Makes the platform immediately invoke another `DetectIntent` call internally with the specified event as input. When this field is set, Dialogflow ignores the `fulfillment_text`, `fulfillment_messages`, and `payload` fields. */ followupEventInput?: Schema$GoogleCloudDialogflowV2beta1EventInput; /** @@ -1531,7 +2090,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The text to be shown on the screen. This value is passed directly to `QueryResult.fulfillment_text`. */ - fulfillmentText?: string; + fulfillmentText?: string | null; /** * Optional. The collection of output contexts. This value is passed directly to `QueryResult.output_contexts`. */ @@ -1539,11 +2098,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. This value is passed directly to `QueryResult.webhook_payload`. See the related `fulfillment_messages[i].payload field`, which may be used as an alternative to this field. This field can be used for Actions on Google responses. It should have a structure similar to the JSON message shown here. For more information, see [Actions on Google Webhook Format](https://developers.google.com/actions/dialogflow/webhook) <pre>{ "google": { "expectUserResponse": true, "richResponse": { "items": [ { "simpleResponse": { "textToSpeech": "this is a simple response" } } ] } } }</pre> */ - payload?: {[key: string]: any}; + payload?: {[key: string]: any} | null; + /** + * 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. Setting the session entity types inside webhook overwrites the session entity types that have been set through `DetectIntentRequest.query_params.session_entity_types`. + */ + sessionEntityTypes?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType[]; /** * Optional. This value is passed directly to `QueryResult.webhook_source`. */ - source?: string; + source?: string | null; } /** * Represents a context. @@ -1552,15 +2115,36 @@ 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 20 minutes if there are no matching queries. */ - lifespanCount?: number; + lifespanCount?: number | null; /** - * Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is always converted to lowercase, may only contain characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long. + * Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` */ - name?: string; + name?: string | null; + /** + * Optional. The collection of parameters associated with this context. Refer to [this doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters) for syntax. + */ + parameters?: {[key: string]: any} | null; + } + /** + * Represents a notification sent to Cloud Pub/Sub subscribers for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2ConversationEvent { + /** + * The unique identifier of the conversation this notification refers to. Format: `projects/<Project ID>/conversations/<Conversation ID>`. + */ + conversation?: string | null; + /** + * More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL. + */ + errorStatus?: Schema$GoogleRpcStatus; + /** + * Payload of NEW_MESSAGE event. + */ + newMessagePayload?: Schema$GoogleCloudDialogflowV2Message; /** - * Optional. The collection of parameters associated with this context. Refer to [this doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters) for syntax. + * The type of the event that this notification refers to. */ - parameters?: {[key: string]: any}; + type?: string | null; } /** * Represents an entity type. Entity types serve as a tool for extracting parameter values from natural language queries. @@ -1569,11 +2153,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. Indicates whether the entity type can be automatically expanded. */ - autoExpansionMode?: string; + autoExpansionMode?: string | null; /** * Required. The name of the entity type. */ - displayName?: string; + displayName?: string | null; + /** + * Optional. Enables fuzzy entity extraction during classification. + */ + enableFuzzyExtraction?: boolean | null; /** * Optional. The collection of entity entries associated with the entity type. */ @@ -1581,11 +2169,11 @@ export namespace dialogflow_v2beta1 { /** * Required. Indicates the kind of entity type. */ - kind?: string; + kind?: string | null; /** * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. */ - name?: string; + name?: string | null; } /** * An **entity entry** for an associated entity type. @@ -1594,41 +2182,41 @@ export namespace dialogflow_v2beta1 { /** * Required. A collection of value synonyms. For example, if the entity type is *vegetable*, and `value` is *scallions*, a synonym could be *green onions*. For `KIND_LIST` entity types: * This collection must contain exactly one synonym equal to `value`. */ - synonyms?: string[]; + synonyms?: string[] | null; /** - * Required. The primary value associated with this entity entry. For example, if the entity type is *vegetable*, the value could be *scallions*. For `KIND_MAP` entity types: * A canonical value to be used in place of synonyms. For `KIND_LIST` entity types: * A string that can contain references to other entity types (with or without aliases). + * Required. The primary value associated with this entity entry. For example, if the entity type is *vegetable*, the value could be *scallions*. For `KIND_MAP` entity types: * A reference value to be used in place of synonyms. For `KIND_LIST` entity types: * A string that can contain references to other entity types (with or without aliases). */ - value?: string; + value?: string | null; } /** * Events allow for matching intents by event name instead of the natural language input. For instance, input `<event: { name: "welcome_event", parameters: { name: "Sam" } }>` can trigger a personalized welcome response. The parameter `name` may be used by the agent in the response: `"Hello #welcome_event.name! What can I do for you today?"`. */ export interface Schema$GoogleCloudDialogflowV2EventInput { /** - * Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + * Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. */ - languageCode?: string; + languageCode?: string | null; /** * Required. The unique identifier of the event. */ - name?: string; + name?: string | null; /** - * Optional. The collection of parameters associated with the event. + * The collection of parameters associated with the event. */ - parameters?: {[key: string]: any}; + parameters?: {[key: string]: any} | null; } /** * The response message for Agents.ExportAgent. */ export interface Schema$GoogleCloudDialogflowV2ExportAgentResponse { /** - * The exported agent. Example for how to export an agent to a zip file via a command line: <pre>curl \ 'https://dialogflow.googleapis.com/v2/projects/&lt;project_name&gt;/agent:export'\ -X POST \ -H 'Authorization: Bearer '$(gcloud auth application-default print-access-token) \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --compressed \ --data-binary '{}' \ | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".x/\1/' \ | base64 --decode > &lt;agent zip file&gt;</pre> + * Zip compressed raw byte content for agent. */ - agentContent?: string; + agentContent?: string | null; /** * The URI to a file containing the exported agent. This field is populated only if `agent_uri` is specified in `ExportAgentRequest`. */ - agentUri?: string; + agentUri?: string | null; } /** * 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 sentence semantics. @@ -1637,19 +2225,19 @@ export namespace dialogflow_v2beta1 { /** * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. */ - action?: string; + action?: string | null; /** - * Optional. The list of platforms for which the first response will be taken from among the messages assigned to the DEFAULT_PLATFORM. + * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). */ - defaultResponsePlatforms?: string[]; + defaultResponsePlatforms?: string[] | null; /** * Required. The name of this intent. */ - displayName?: string; + displayName?: string | null; /** * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. */ - events?: string[]; + events?: string[] | null; /** * Read-only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. */ @@ -1657,23 +2245,23 @@ export namespace dialogflow_v2beta1 { /** * Optional. The list of context names required for this intent to be triggered. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. */ - inputContextNames?: string[]; + inputContextNames?: string[] | null; /** * Optional. Indicates whether this is a fallback intent. */ - isFallback?: boolean; + isFallback?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ messages?: Schema$GoogleCloudDialogflowV2IntentMessage[]; /** - * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_diabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. + * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. */ - mlDisabled?: boolean; + mlDisabled?: boolean | null; /** * The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - name?: string; + name?: string | null; /** * Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. */ @@ -1685,19 +2273,19 @@ export namespace dialogflow_v2beta1 { /** * Read-only after creation. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - parentFollowupIntentName?: string; + parentFollowupIntentName?: string | null; /** - * Optional. The priority of this intent. Higher numbers represent higher priorities. If this is zero or unspecified, we use the default priority 500000. Negative numbers mean that the intent is disabled. + * Optional. The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the `Normal` priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests. */ - priority?: number; + priority?: number | null; /** * Optional. Indicates whether to delete all contexts in the current session when this intent is matched. */ - resetContexts?: boolean; + resetContexts?: boolean | null; /** * Read-only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. We populate this field only in the output. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - rootFollowupIntentName?: string; + rootFollowupIntentName?: string | null; /** * Optional. The collection of examples that the agent is trained on. */ @@ -1705,7 +2293,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. Indicates whether webhooks are enabled for the intent. */ - webhookState?: string; + webhookState?: string | null; } /** * Represents a single followup intent in the chain. @@ -1714,11 +2302,11 @@ export namespace dialogflow_v2beta1 { /** * The unique identifier of the followup intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - followupIntentName?: string; + followupIntentName?: string | null; /** * The unique identifier of the followup intent's parent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ - parentFollowupIntentName?: string; + parentFollowupIntentName?: string | null; } /** * Corresponds to the `Response` field in the Dialogflow console. @@ -1728,6 +2316,10 @@ export namespace dialogflow_v2beta1 { * The basic card response for Actions on Google. */ basicCard?: Schema$GoogleCloudDialogflowV2IntentMessageBasicCard; + /** + * Browse carousel card for Actions on Google. + */ + browseCarouselCard?: Schema$GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard; /** * The card response. */ @@ -1748,14 +2340,18 @@ export namespace dialogflow_v2beta1 { * The list card response for Actions on Google. */ listSelect?: Schema$GoogleCloudDialogflowV2IntentMessageListSelect; + /** + * The media content card for Actions on Google. + */ + mediaContent?: Schema$GoogleCloudDialogflowV2IntentMessageMediaContent; /** * Returns a response containing a custom, platform-specific payload. See the Intent.Message.Platform type for a description of the structure that may be required for your platform. */ - payload?: {[key: string]: any}; + payload?: {[key: string]: any} | null; /** * Optional. The platform that this message is intended for. */ - platform?: string; + platform?: string | null; /** * The quick replies response. */ @@ -1768,6 +2364,10 @@ export namespace dialogflow_v2beta1 { * The suggestion chips for Actions on Google. */ suggestions?: Schema$GoogleCloudDialogflowV2IntentMessageSuggestions; + /** + * Table card for Actions on Google. + */ + tableCard?: Schema$GoogleCloudDialogflowV2IntentMessageTableCard; /** * The text response. */ @@ -1784,7 +2384,7 @@ export namespace dialogflow_v2beta1 { /** * Required, unless image is present. The body text of the card. */ - formattedText?: string; + formattedText?: string | null; /** * Optional. The image for the card. */ @@ -1792,11 +2392,11 @@ export namespace dialogflow_v2beta1 { /** * Optional. The subtitle of the card. */ - subtitle?: string; + subtitle?: string | null; /** * Optional. The title of the card. */ - title?: string; + title?: string | null; } /** * The button object that appears at the bottom of a card. @@ -1809,7 +2409,7 @@ export namespace dialogflow_v2beta1 { /** * Required. The title of the button. */ - title?: string; + title?: string | null; } /** * Opens the given URI. @@ -1818,41 +2418,92 @@ export namespace dialogflow_v2beta1 { /** * Required. The HTTP or HTTPS scheme URI. */ - uri?: string; + uri?: string | null; } /** - * The card response message. + * Browse Carousel Card for Actions on Google. https://developers.google.com/actions/assistant/responses#browsing_carousel */ - export interface Schema$GoogleCloudDialogflowV2IntentMessageCard { + export interface Schema$GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard { /** - * Optional. The collection of card buttons. + * Optional. Settings for displaying the image. Applies to every image in items. + */ + imageDisplayOptions?: string | null; + /** + * Required. List of items in the Browse Carousel Card. Minimum of two items, maximum of ten. + */ + items?: Schema$GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem[]; + } + /** + * Browsing carousel tile + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem { + /** + * Optional. Description of the carousel item. Maximum of four lines of text. + */ + description?: string | null; + /** + * Optional. Text that appears at the bottom of the Browse Carousel Card. Maximum of one line of text. + */ + footer?: string | null; + /** + * Optional. Hero image for the carousel item. + */ + image?: Schema$GoogleCloudDialogflowV2IntentMessageImage; + /** + * Required. Action to present to the user. + */ + openUriAction?: Schema$GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction; + /** + * Required. Title of the carousel item. Maximum of two lines of text. + */ + title?: string | null; + } + /** + * Actions on Google action to open a given url. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction { + /** + * Required. URL + */ + url?: string | null; + /** + * Optional. Specifies the type of viewer that is used when opening the URL. Defaults to opening via web browser. + */ + urlTypeHint?: string | null; + } + /** + * The card response message. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageCard { + /** + * Optional. The collection of card buttons. */ buttons?: Schema$GoogleCloudDialogflowV2IntentMessageCardButton[]; /** * Optional. The public URI to an image file for the card. */ - imageUri?: string; + imageUri?: string | null; /** * Optional. The subtitle of the card. */ - subtitle?: string; + subtitle?: string | null; /** * Optional. The title of the card. */ - title?: string; + title?: string | null; } /** - * Optional. Contains information about a button. + * Contains information about a button. */ export interface Schema$GoogleCloudDialogflowV2IntentMessageCardButton { /** * Optional. The text to send back to the Dialogflow API or a URI to open. */ - postback?: string; + postback?: string | null; /** * Optional. The text to show on the button. */ - text?: string; + text?: string | null; } /** * The card for presenting a carousel of options to select from. @@ -1870,7 +2521,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The body text of the card. */ - description?: string; + description?: string | null; /** * Optional. The image to display. */ @@ -1882,7 +2533,20 @@ export namespace dialogflow_v2beta1 { /** * Required. Title of the carousel item. */ - title?: string; + title?: string | null; + } + /** + * Column properties for TableCard. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageColumnProperties { + /** + * Required. Column heading. + */ + header?: string | null; + /** + * Optional. Defines text alignment for all cells in this column. + */ + horizontalAlignment?: string | null; } /** * The image response message. @@ -1891,11 +2555,11 @@ export namespace dialogflow_v2beta1 { /** * Optional. A text description of the image to be used for accessibility, e.g., screen readers. */ - accessibilityText?: string; + accessibilityText?: string | null; /** * Optional. The public URI to an image file. */ - imageUri?: string; + imageUri?: string | null; } /** * The suggestion chip message that allows the user to jump out to the app or website associated with this agent. @@ -1904,11 +2568,11 @@ export namespace dialogflow_v2beta1 { /** * Required. The name of the app or site this chip is linking to. */ - destinationName?: string; + destinationName?: string | null; /** * Required. The URI of the app or site to open when the user taps the suggestion chip. */ - uri?: string; + uri?: string | null; } /** * The card for presenting a list of options to select from. @@ -1918,10 +2582,14 @@ export namespace dialogflow_v2beta1 { * Required. List items. */ items?: Schema$GoogleCloudDialogflowV2IntentMessageListSelectItem[]; + /** + * Optional. Subtitle of the list. + */ + subtitle?: string | null; /** * Optional. The overall title of the list. */ - title?: string; + title?: string | null; } /** * An item in the list. @@ -1930,7 +2598,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The main text describing the item. */ - description?: string; + description?: string | null; /** * Optional. The image to display. */ @@ -1942,7 +2610,45 @@ export namespace dialogflow_v2beta1 { /** * Required. The title of the list item. */ - title?: string; + title?: string | null; + } + /** + * The media content card for Actions on Google. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageMediaContent { + /** + * Required. List of media objects. + */ + mediaObjects?: Schema$GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject[]; + /** + * Optional. What type of media is the content (ie "audio"). + */ + mediaType?: string | null; + } + /** + * Response media object for media content card. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject { + /** + * Required. Url where the media is stored. + */ + contentUrl?: string | null; + /** + * Optional. Description of media card. + */ + description?: string | null; + /** + * Optional. Icon to display above media content. + */ + icon?: Schema$GoogleCloudDialogflowV2IntentMessageImage; + /** + * Optional. Image to display above media content. + */ + largeImage?: Schema$GoogleCloudDialogflowV2IntentMessageImage; + /** + * Required. Name of media card. + */ + name?: string | null; } /** * The quick replies response message. @@ -1951,11 +2657,11 @@ export namespace dialogflow_v2beta1 { /** * Optional. The collection of quick replies. */ - quickReplies?: string[]; + quickReplies?: string[] | null; /** * Optional. The title of the collection of quick replies. */ - title?: string; + title?: string | null; } /** * Additional info about the select item for when it is triggered in a dialog. @@ -1964,11 +2670,11 @@ export namespace dialogflow_v2beta1 { /** * Required. A unique key that will be sent back to the agent if this response is given. */ - key?: string; + key?: string | null; /** * Optional. A list of synonyms that can also be used to trigger this item in dialog. */ - synonyms?: string[]; + synonyms?: string[] | null; } /** * The simple response message containing speech or text. @@ -1977,15 +2683,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. The text to display. */ - displayText?: string; + displayText?: string | null; /** * One of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text_to_speech. */ - ssml?: string; + ssml?: string | null; /** * One of text_to_speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml. */ - textToSpeech?: string; + textToSpeech?: string | null; } /** * The collection of simple response candidates. This message in `QueryResult.fulfillment_messages` and `WebhookResponse.fulfillment_messages` should contain only one `SimpleResponse`. @@ -2003,7 +2709,7 @@ export namespace dialogflow_v2beta1 { /** * Required. The text shown the in the suggestion chip. */ - title?: string; + title?: string | null; } /** * The collection of suggestions. @@ -2014,6 +2720,57 @@ export namespace dialogflow_v2beta1 { */ suggestions?: Schema$GoogleCloudDialogflowV2IntentMessageSuggestion[]; } + /** + * Table card for Actions on Google. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageTableCard { + /** + * Optional. List of buttons for the card. + */ + buttons?: Schema$GoogleCloudDialogflowV2IntentMessageBasicCardButton[]; + /** + * Optional. Display properties for the columns in this table. + */ + columnProperties?: Schema$GoogleCloudDialogflowV2IntentMessageColumnProperties[]; + /** + * Optional. Image which should be displayed on the card. + */ + image?: Schema$GoogleCloudDialogflowV2IntentMessageImage; + /** + * Optional. Rows in this table of data. + */ + rows?: Schema$GoogleCloudDialogflowV2IntentMessageTableCardRow[]; + /** + * Optional. Subtitle to the title. + */ + subtitle?: string | null; + /** + * Required. Title of the card. + */ + title?: string | null; + } + /** + * Cell of TableCardRow. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageTableCardCell { + /** + * Required. Text in this cell. + */ + text?: string | null; + } + /** + * Row of TableCard. + */ + export interface Schema$GoogleCloudDialogflowV2IntentMessageTableCardRow { + /** + * Optional. List of cells that make up this row. + */ + cells?: Schema$GoogleCloudDialogflowV2IntentMessageTableCardCell[]; + /** + * Optional. Whether to add a visual divider after this row. + */ + dividerAfter?: boolean | null; + } /** * The text response message. */ @@ -2021,7 +2778,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The collection of the agent's responses. */ - text?: string[]; + text?: string[] | null; } /** * Represents intent parameters. @@ -2030,35 +2787,35 @@ export namespace dialogflow_v2beta1 { /** * Optional. The default value to use when the `value` yields an empty result. Default values can be extracted from contexts by using the following syntax: `#context_name.parameter_name`. */ - defaultValue?: string; + defaultValue?: string | null; /** * Required. The name of the parameter. */ - displayName?: string; + displayName?: string | null; /** * Optional. The name of the entity type, prefixed with `@`, that describes values of the parameter. If the parameter is required, this must be provided. */ - entityTypeDisplayName?: string; + entityTypeDisplayName?: string | null; /** * Optional. Indicates whether the parameter represents a list of values. */ - isList?: boolean; + isList?: boolean | null; /** * Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value. */ - mandatory?: boolean; + mandatory?: boolean | null; /** * The unique identifier of this parameter. */ - name?: string; + name?: string | null; /** - * Optional. The collection of prompts that the agent can present to the user in order to collect value for the parameter. + * Optional. The collection of prompts that the agent can present to the user in order to collect a value for the parameter. */ - prompts?: string[]; + prompts?: string[] | null; /** * Optional. The definition of the parameter value. It can be: - a constant string, - a parameter value defined as `$parameter_name`, - an original parameter value defined as `$parameter_name.original`, - a parameter value from some context defined as `#context_name.parameter_name`. */ - value?: string; + value?: string | null; } /** * Represents an example that the agent is trained on. @@ -2067,7 +2824,7 @@ export namespace dialogflow_v2beta1 { /** * Output only. The unique identifier of this training phrase. */ - name?: string; + name?: string | null; /** * Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `entity_type`, `alias`, and `user_defined` fields are all set. */ @@ -2075,11 +2832,11 @@ export namespace dialogflow_v2beta1 { /** * Optional. Indicates how many times this example was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased. */ - timesAddedCount?: number; + timesAddedCount?: number | null; /** * Required. The type of the training phrase. */ - type?: string; + type?: string | null; } /** * Represents a part of a training phrase. @@ -2088,19 +2845,65 @@ export namespace dialogflow_v2beta1 { /** * Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase. */ - alias?: string; + alias?: string | null; /** * Optional. The entity type name prefixed with `@`. This field is required for annotated parts of the training phrase. */ - entityType?: string; + entityType?: string | null; /** * Required. The text for this part. */ - text?: string; + text?: string | null; /** * Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true. */ - userDefined?: boolean; + userDefined?: boolean | null; + } + /** + * Represents a message posted into a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2Message { + /** + * Required. The message content. + */ + content?: string | null; + /** + * Output only. The time when the message was created. + */ + createTime?: string | null; + /** + * Optional. 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 | null; + /** + * Output only. The annotation for the message. + */ + messageAnnotation?: Schema$GoogleCloudDialogflowV2MessageAnnotation; + /** + * The unique identifier of the message. Format: `projects/<Project ID>/conversations/<Conversation ID>/messages/<Message ID>`. + */ + name?: string | null; + /** + * Output only. The participant that sends this message. + */ + participant?: string | null; + /** + * Output only. The role of the participant. + */ + participantRole?: string | null; + } + /** + * Represents the result of annotation for the message. + */ + export interface Schema$GoogleCloudDialogflowV2MessageAnnotation { + /** + * Indicates whether the text message contains entities. + */ + containEntities?: boolean | null; + /** + * The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text]. + */ + parts?: Schema$GoogleCloudDialogflowV2AnnotatedMessagePart[]; } /** * Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call. @@ -2109,15 +2912,15 @@ export namespace dialogflow_v2beta1 { /** * Optional. This field is set to the value of the `QueryParameters.payload` field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular for the Telephony Gateway this field has the form: <pre>{ "telephony": { "caller_id": "+18558363987" } }</pre> Note: The caller ID field (`caller_id`) will be redacted for Standard Edition agents and populated with the caller ID in [E.164 format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents. */ - payload?: {[key: string]: any}; + payload?: {[key: string]: any} | null; /** * The source of this request, e.g., `google`, `facebook`, `slack`. It is set by Dialogflow-owned servers. */ - source?: string; + source?: string | null; /** * Optional. The version of the protocol used for this request. This field is AoG-specific. */ - version?: string; + version?: string | null; } /** * Represents the result of conversational query or event processing. @@ -2126,15 +2929,15 @@ export namespace dialogflow_v2beta1 { /** * The action name from the matched intent. */ - action?: string; + action?: string | null; /** - * This field is set to: - `false` if the matched intent has required parameters and not all of the required parameter values have been collected. - `true` if all required parameter values have been collected, or if the matched intent doesn't contain any required parameters. + * This field is set to: - `false` if the matched intent has required parameters and not all of the required parameter values have been collected. - `true` if all required parameter values have been collected, or if the matched intent doesn't contain any required parameters. */ - allRequiredParamsPresent?: boolean; + allRequiredParamsPresent?: boolean | null; /** - * The free-form diagnostic info. For example, this field could contain webhook call latency. The string keys of the Struct's fields map can change without notice. + * Free-form diagnostic information for the associated detect intent request. The fields of this data can change without notice, so you should not write code that depends on its structure. The data may contain: - webhook call latency - webhook errors */ - diagnosticInfo?: {[key: string]: any}; + diagnosticInfo?: {[key: string]: any} | null; /** * The collection of rich messages to present to the user. */ @@ -2142,19 +2945,19 @@ export namespace dialogflow_v2beta1 { /** * The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, `fulfillment_messages` should be preferred. */ - fulfillmentText?: string; + fulfillmentText?: string | null; /** - * The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: `name`, `display_name` and `webhook_state`. + * The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: `name`, `display_name`, `end_interaction` and `is_fallback`. */ intent?: Schema$GoogleCloudDialogflowV2Intent; /** - * The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). If there are `multiple knowledge_answers` messages, this value is set to the greatest `knowledgeAnswers.match_confidence` value in the list. + * The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. If there are `multiple knowledge_answers` messages, this value is set to the greatest `knowledgeAnswers.match_confidence` value in the list. */ - intentDetectionConfidence?: number; + intentDetectionConfidence?: number | null; /** - * The language that was triggered during intent detection. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. + * The language that was triggered during intent detection. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. */ - languageCode?: string; + languageCode?: string | null; /** * The collection of output contexts. If applicable, `output_contexts.parameters` contains entries with name `<parameter name>.original` containing the original parameter values before the query. */ @@ -2162,11 +2965,11 @@ export namespace dialogflow_v2beta1 { /** * The collection of extracted parameters. */ - parameters?: {[key: string]: any}; + parameters?: {[key: string]: any} | null; /** - * The original conversational query text: - If natural language text was provided as input, `query_text` contains a copy of the input. - If natural language speech audio was provided as input, `query_text` contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked. - If an event was provided as input, `query_text` is not set. + * The original conversational query text: - If natural language text was provided as input, `query_text` contains a copy of the input. - If natural language speech audio was provided as input, `query_text` contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked. - If automatic spell correction is enabled, `query_text` will contain the corrected user input. */ - queryText?: string; + queryText?: string | null; /** * The sentiment analysis result, which depends on the `sentiment_analysis_request_config` specified in the request. */ @@ -2174,15 +2977,15 @@ export namespace dialogflow_v2beta1 { /** * The Speech recognition confidence between 0.0 and 1.0. 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 not guaranteed to be accurate or set. In particular this field isn't set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult. */ - speechRecognitionConfidence?: number; + speechRecognitionConfidence?: number | null; /** * If the query was fulfilled by a webhook call, this field is set to the value of the `payload` field returned in the webhook response. */ - webhookPayload?: {[key: string]: any}; + webhookPayload?: {[key: string]: any} | null; /** * If the query was fulfilled by a webhook call, this field is set to the value of the `source` field returned in the webhook response. */ - webhookSource?: string; + webhookSource?: string | null; } /** * The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. @@ -2191,11 +2994,11 @@ export namespace dialogflow_v2beta1 { /** * A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative). */ - magnitude?: number; + magnitude?: number | null; /** * Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). */ - score?: number; + score?: number | null; } /** * The result of sentiment analysis as configured by `sentiment_analysis_request_config`. @@ -2206,6 +3009,23 @@ export namespace dialogflow_v2beta1 { */ queryTextSentiment?: Schema$GoogleCloudDialogflowV2Sentiment; } + /** + * Represents a session entity type. Extends or replaces a custom entity type at the user session level (we refer to the entity types defined at the agent level as "custom entity types"). Note: session entity types apply to all queries, regardless of the language. + */ + export interface Schema$GoogleCloudDialogflowV2SessionEntityType { + /** + * Required. The collection of entities associated with this session entity type. + */ + entities?: Schema$GoogleCloudDialogflowV2EntityTypeEntity[]; + /** + * Required. Indicates whether the additional data should override or supplement the custom entity type definition. + */ + entityOverrideMode?: string | null; + /** + * Required. The unique identifier of this session entity type. Format: `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`, or `projects/<Project ID>/agent/environments/<Environment 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. `<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 | null; + } /** * The request message for a webhook call. */ @@ -2221,18 +3041,18 @@ export namespace dialogflow_v2beta1 { /** * The unique identifier of the response. Contains the same value as `[Streaming]DetectIntentResponse.response_id`. */ - responseId?: string; + responseId?: string | null; /** * The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>`. */ - session?: string; + session?: string | null; } /** - * The response message for a webhook call. + * The response message for a webhook call. This response is validated by the Dialogflow server. If validation fails, an error will be returned in the QueryResult.diagnostic_info field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error: - Use `""` for empty strings - Use `{}` or `null` for empty objects - Use `[]` or `null` for empty arrays For more information, see the [Protocol Buffers Language Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). */ export interface Schema$GoogleCloudDialogflowV2WebhookResponse { /** - * Optional. Makes the platform immediately invoke another `DetectIntent` call internally with the specified event as input. + * Optional. Makes the platform immediately invoke another `DetectIntent` call internally with the specified event as input. When this field is set, Dialogflow ignores the `fulfillment_text`, `fulfillment_messages`, and `payload` fields. */ followupEventInput?: Schema$GoogleCloudDialogflowV2EventInput; /** @@ -2242,7 +3062,7 @@ export namespace dialogflow_v2beta1 { /** * Optional. The text to be shown on the screen. This value is passed directly to `QueryResult.fulfillment_text`. */ - fulfillmentText?: string; + fulfillmentText?: string | null; /** * Optional. The collection of output contexts. This value is passed directly to `QueryResult.output_contexts`. */ @@ -2250,11 +3070,28 @@ export namespace dialogflow_v2beta1 { /** * Optional. This value is passed directly to `QueryResult.webhook_payload`. See the related `fulfillment_messages[i].payload field`, which may be used as an alternative to this field. This field can be used for Actions on Google responses. It should have a structure similar to the JSON message shown here. For more information, see [Actions on Google Webhook Format](https://developers.google.com/actions/dialogflow/webhook) <pre>{ "google": { "expectUserResponse": true, "richResponse": { "items": [ { "simpleResponse": { "textToSpeech": "this is a simple response" } } ] } } }</pre> */ - payload?: {[key: string]: any}; + payload?: {[key: string]: any} | null; + /** + * 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. Setting the session entity types inside webhook overwrites the session entity types that have been set through `DetectIntentRequest.query_params.session_entity_types`. + */ + sessionEntityTypes?: Schema$GoogleCloudDialogflowV2SessionEntityType[]; /** * Optional. This value is passed directly to `QueryResult.webhook_source`. */ - source?: string; + source?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$GoogleLongrunningListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$GoogleLongrunningOperation[]; } /** * This resource represents a long-running operation that is the result of a network API call. @@ -2263,7 +3100,7 @@ export namespace dialogflow_v2beta1 { /** * 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; + done?: boolean | null; /** * The error result of the operation in case of failure or cancellation. */ @@ -2271,36 +3108,36 @@ export namespace dialogflow_v2beta1 { /** * 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?: {[key: string]: any}; + metadata?: {[key: string]: any} | null; /** * 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 be a resource name ending with `operations/{unique_id}`. */ - name?: string; + name?: string | null; /** * 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?: {[key: string]: any}; + response?: {[key: string]: any} | null; } /** * 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$GoogleProtobufEmpty {} /** - * 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. + * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ export interface Schema$GoogleRpcStatus { /** * The status code, which should be an enum value of google.rpc.Code. */ - code?: number; + code?: number | null; /** * A list of messages that carry the error details. There is a common set of message types for APIs to use. */ - details?: Array<{[key: string]: any}>; + details?: Array<{[key: string]: any}> | null; /** * 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?: string | null; } /** * An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 standard</a>. Values must be within normalized ranges. @@ -2309,25 +3146,103 @@ export namespace dialogflow_v2beta1 { /** * The latitude in degrees. It must be in the range [-90.0, +90.0]. */ - latitude?: number; + latitude?: number | null; /** * The longitude in degrees. It must be in the range [-180.0, +180.0]. */ - longitude?: number; + longitude?: number | null; } export class Resource$Projects { context: APIRequestContext; agent: Resource$Projects$Agent; knowledgeBases: Resource$Projects$Knowledgebases; + locations: Resource$Projects$Locations; operations: Resource$Projects$Operations; constructor(context: APIRequestContext) { this.context = context; this.agent = new Resource$Projects$Agent(this.context); this.knowledgeBases = new Resource$Projects$Knowledgebases(this.context); + this.locations = new Resource$Projects$Locations(this.context); this.operations = new Resource$Projects$Operations(this.context); } + /** + * dialogflow.projects.deleteAgent + * @desc Deletes the specified agent. + * @alias dialogflow.projects.deleteAgent + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project that the agent to delete is associated with. 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 + */ + deleteAgent( + params?: Params$Resource$Projects$Deleteagent, + options?: MethodOptions + ): GaxiosPromise; + deleteAgent( + params: Params$Resource$Projects$Deleteagent, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteAgent( + params: Params$Resource$Projects$Deleteagent, + callback: BodyResponseCallback + ): void; + deleteAgent( + callback: BodyResponseCallback + ): void; + deleteAgent( + paramsOrCallback?: + | Params$Resource$Projects$Deleteagent + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Deleteagent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Deleteagent; + 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}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + /** * dialogflow.projects.getAgent * @desc Retrieves the specified agent. @@ -2410,88 +3325,55 @@ export namespace dialogflow_v2beta1 { ); } } - } - - export interface Params$Resource$Projects$Getagent - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The project that the agent to fetch is associated with. Format: `projects/`. - */ - parent?: string; - } - - export class Resource$Projects$Agent { - context: APIRequestContext; - entityTypes: Resource$Projects$Agent$Entitytypes; - environments: Resource$Projects$Agent$Environments; - intents: Resource$Projects$Agent$Intents; - knowledgeBases: Resource$Projects$Agent$Knowledgebases; - sessions: Resource$Projects$Agent$Sessions; - constructor(context: APIRequestContext) { - this.context = context; - this.entityTypes = new Resource$Projects$Agent$Entitytypes(this.context); - this.environments = new Resource$Projects$Agent$Environments( - this.context - ); - this.intents = new Resource$Projects$Agent$Intents(this.context); - this.knowledgeBases = new Resource$Projects$Agent$Knowledgebases( - this.context - ); - this.sessions = new Resource$Projects$Agent$Sessions(this.context); - } /** - * dialogflow.projects.agent.export - * @desc Exports the specified agent to a ZIP file. Operation - * @alias dialogflow.projects.agent.export + * dialogflow.projects.setAgent + * @desc Creates/updates the specified agent. + * @alias dialogflow.projects.setAgent * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The project that the agent to export is associated with. Format: `projects/`. - * @param {().GoogleCloudDialogflowV2beta1ExportAgentRequest} params.resource Request body data + * @param {string} params.parent Required. The project of this agent. Format: `projects/`. + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Agent} params.requestBody 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 */ - export( - params?: Params$Resource$Projects$Agent$Export, + setAgent( + params?: Params$Resource$Projects$Setagent, options?: MethodOptions - ): GaxiosPromise; - export( - params: Params$Resource$Projects$Agent$Export, + ): GaxiosPromise; + setAgent( + params: Params$Resource$Projects$Setagent, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - export( - params: Params$Resource$Projects$Agent$Export, - callback: BodyResponseCallback + setAgent( + params: Params$Resource$Projects$Setagent, + callback: BodyResponseCallback ): void; - export( - callback: BodyResponseCallback + setAgent( + callback: BodyResponseCallback ): void; - export( + setAgent( paramsOrCallback?: - | Params$Resource$Projects$Agent$Export - | BodyResponseCallback, + | Params$Resource$Projects$Setagent + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Export; + {}) as Params$Resource$Projects$Setagent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Export; + params = {} as Params$Resource$Projects$Setagent; options = {}; } @@ -2504,7 +3386,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:export').replace( + url: (rootUrl + '/v2beta1/{+parent}/agent').replace( /([^:]\/)\/+/g, '$1' ), @@ -2518,49 +3400,118 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + + export interface Params$Resource$Projects$Deleteagent + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * dialogflow.projects.agent.import - * @desc Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. Operation - * @alias dialogflow.projects.agent.import + * Required. The project that the agent to delete is associated with. Format: `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Getagent + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The project that the agent to fetch is associated with. Format: `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Setagent + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The project of this agent. Format: `projects/`. + */ + parent?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Agent; + } + + export class Resource$Projects$Agent { + context: APIRequestContext; + entityTypes: Resource$Projects$Agent$Entitytypes; + environments: Resource$Projects$Agent$Environments; + intents: Resource$Projects$Agent$Intents; + knowledgeBases: Resource$Projects$Agent$Knowledgebases; + sessions: Resource$Projects$Agent$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.entityTypes = new Resource$Projects$Agent$Entitytypes(this.context); + this.environments = new Resource$Projects$Agent$Environments( + this.context + ); + this.intents = new Resource$Projects$Agent$Intents(this.context); + this.knowledgeBases = new Resource$Projects$Agent$Knowledgebases( + this.context + ); + this.sessions = new Resource$Projects$Agent$Sessions(this.context); + } + + /** + * dialogflow.projects.agent.export + * @desc Exports the specified agent to a ZIP file. Operation + * @alias dialogflow.projects.agent.export * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The project that the agent to import is associated with. Format: `projects/`. - * @param {().GoogleCloudDialogflowV2beta1ImportAgentRequest} params.resource Request body data + * @param {string} params.parent Required. The project that the agent to export is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1ExportAgentRequest} params.requestBody 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 */ - import( - params?: Params$Resource$Projects$Agent$Import, + export( + params?: Params$Resource$Projects$Agent$Export, options?: MethodOptions ): GaxiosPromise; - import( - params: Params$Resource$Projects$Agent$Import, + export( + params: Params$Resource$Projects$Agent$Export, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - import( - params: Params$Resource$Projects$Agent$Import, + export( + params: Params$Resource$Projects$Agent$Export, callback: BodyResponseCallback ): void; - import( + export( callback: BodyResponseCallback ): void; - import( + export( paramsOrCallback?: - | Params$Resource$Projects$Agent$Import + | Params$Resource$Projects$Agent$Export | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -2568,12 +3519,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Import; + {}) as Params$Resource$Projects$Agent$Export; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Import; + params = {} as Params$Resource$Projects$Agent$Export; options = {}; } @@ -2586,7 +3537,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:import').replace( + url: (rootUrl + '/v2beta1/{+parent}/agent:export').replace( /([^:]\/)\/+/g, '$1' ), @@ -2610,52 +3561,59 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.restore - * @desc Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. Operation - * @alias dialogflow.projects.agent.restore + * dialogflow.projects.agent.getFulfillment + * @desc Retrieves the fulfillment. + * @alias dialogflow.projects.agent.getFulfillment * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The project that the agent to restore is associated with. Format: `projects/`. - * @param {().GoogleCloudDialogflowV2beta1RestoreAgentRequest} params.resource Request body data + * @param {string} params.name Required. The name of the fulfillment. Format: `projects//agent/fulfillment`. * @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 */ - restore( - params?: Params$Resource$Projects$Agent$Restore, + getFulfillment( + params?: Params$Resource$Projects$Agent$Getfulfillment, options?: MethodOptions - ): GaxiosPromise; - restore( - params: Params$Resource$Projects$Agent$Restore, + ): GaxiosPromise; + getFulfillment( + params: Params$Resource$Projects$Agent$Getfulfillment, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > ): void; - restore( - params: Params$Resource$Projects$Agent$Restore, - callback: BodyResponseCallback + getFulfillment( + params: Params$Resource$Projects$Agent$Getfulfillment, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > ): void; - restore( - callback: BodyResponseCallback + getFulfillment( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > ): void; - restore( + getFulfillment( paramsOrCallback?: - | Params$Resource$Projects$Agent$Restore - | BodyResponseCallback, + | Params$Resource$Projects$Agent$Getfulfillment + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Restore; + {}) as Params$Resource$Projects$Agent$Getfulfillment; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Restore; + params = {} as Params$Resource$Projects$Agent$Getfulfillment; options = {}; } @@ -2668,93 +3626,91 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:restore').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * dialogflow.projects.agent.search - * @desc Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). - * @alias dialogflow.projects.agent.search + * dialogflow.projects.agent.getValidationResult + * @desc Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed. + * @alias dialogflow.projects.agent.getValidationResult * @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 project to list agents from. Format: `projects/`. + * @param {string=} params.languageCode Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.parent Required. The project that the agent is associated with. 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 */ - search( - params?: Params$Resource$Projects$Agent$Search, + getValidationResult( + params?: Params$Resource$Projects$Agent$Getvalidationresult, options?: MethodOptions - ): GaxiosPromise; - search( - params: Params$Resource$Projects$Agent$Search, + ): GaxiosPromise; + getValidationResult( + params: Params$Resource$Projects$Agent$Getvalidationresult, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult > ): void; - search( - params: Params$Resource$Projects$Agent$Search, + getValidationResult( + params: Params$Resource$Projects$Agent$Getvalidationresult, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult > ): void; - search( + getValidationResult( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult > ): void; - search( + getValidationResult( paramsOrCallback?: - | Params$Resource$Projects$Agent$Search + | Params$Resource$Projects$Agent$Getvalidationresult | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult > ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Search; + {}) as Params$Resource$Projects$Agent$Getvalidationresult; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Search; + params = {} as Params$Resource$Projects$Agent$Getvalidationresult; options = {}; } @@ -2767,10 +3723,9 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:search').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: ( + rootUrl + '/v2beta1/{+parent}/agent/validationResult' + ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options @@ -2781,50 +3736,51 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse - >(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + Schema$GoogleCloudDialogflowV2beta1ValidationResult >(parameters); } } /** - * dialogflow.projects.agent.train - * @desc Trains the specified agent. Operation - * @alias dialogflow.projects.agent.train + * dialogflow.projects.agent.import + * @desc Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. Operation + * @alias dialogflow.projects.agent.import * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The project that the agent to train is associated with. Format: `projects/`. - * @param {().GoogleCloudDialogflowV2beta1TrainAgentRequest} params.resource Request body data + * @param {string} params.parent Required. The project that the agent to import is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1ImportAgentRequest} params.requestBody 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 */ - train( - params?: Params$Resource$Projects$Agent$Train, + import( + params?: Params$Resource$Projects$Agent$Import, options?: MethodOptions ): GaxiosPromise; - train( - params: Params$Resource$Projects$Agent$Train, + import( + params: Params$Resource$Projects$Agent$Import, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - train( - params: Params$Resource$Projects$Agent$Train, + import( + params: Params$Resource$Projects$Agent$Import, callback: BodyResponseCallback ): void; - train( + import( callback: BodyResponseCallback ): void; - train( + import( paramsOrCallback?: - | Params$Resource$Projects$Agent$Train + | Params$Resource$Projects$Agent$Import | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -2832,12 +3788,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Train; + {}) as Params$Resource$Projects$Agent$Import; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Train; + params = {} as Params$Resource$Projects$Agent$Import; options = {}; } @@ -2850,7 +3806,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:train').replace( + url: (rootUrl + '/v2beta1/{+parent}/agent:import').replace( /([^:]\/)\/+/g, '$1' ), @@ -2872,141 +3828,41 @@ export namespace dialogflow_v2beta1 { return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Agent$Export - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The project that the agent to export is associated with. Format: `projects/`. + * dialogflow.projects.agent.restore + * @desc Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. Operation + * @alias dialogflow.projects.agent.restore + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project that the agent to restore is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1RestoreAgentRequest} params.requestBody 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 */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1ExportAgentRequest; - } - export interface Params$Resource$Projects$Agent$Import - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The project that the agent to import is associated with. Format: `projects/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest; - } - export interface Params$Resource$Projects$Agent$Restore - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The project that the agent to restore is associated with. Format: `projects/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1RestoreAgentRequest; - } - export interface Params$Resource$Projects$Agent$Search - extends StandardParameters { - /** - * 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 project to list agents from. Format: `projects/`. - */ - parent?: string; - } - export interface Params$Resource$Projects$Agent$Train - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The project that the agent to train is associated with. Format: `projects/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1TrainAgentRequest; - } - - export class Resource$Projects$Agent$Entitytypes { - context: APIRequestContext; - entities: Resource$Projects$Agent$Entitytypes$Entities; - constructor(context: APIRequestContext) { - this.context = context; - this.entities = new Resource$Projects$Agent$Entitytypes$Entities( - this.context - ); - } - - /** - * dialogflow.projects.agent.entityTypes.batchDelete - * @desc Deletes entity types in the specified agent. Operation - * @alias dialogflow.projects.agent.entityTypes.batchDelete - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the agent to delete all entities types for. Format: `projects//agent`. - * @param {().GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest} 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 - */ - batchDelete( - params?: Params$Resource$Projects$Agent$Entitytypes$Batchdelete, + restore( + params?: Params$Resource$Projects$Agent$Restore, options?: MethodOptions ): GaxiosPromise; - batchDelete( - params: Params$Resource$Projects$Agent$Entitytypes$Batchdelete, + restore( + params: Params$Resource$Projects$Agent$Restore, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Agent$Entitytypes$Batchdelete, + restore( + params: Params$Resource$Projects$Agent$Restore, callback: BodyResponseCallback ): void; - batchDelete( + restore( callback: BodyResponseCallback ): void; - batchDelete( + restore( paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Batchdelete + | Params$Resource$Projects$Agent$Restore | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -3014,12 +3870,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Batchdelete; + {}) as Params$Resource$Projects$Agent$Restore; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$Batchdelete; + params = {} as Params$Resource$Projects$Agent$Restore; options = {}; } @@ -3032,9 +3888,10 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: ( - rootUrl + '/v2beta1/{+parent}/entityTypes:batchDelete' - ).replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v2beta1/{+parent}/agent:restore').replace( + /([^:]\/)\/+/g, + '$1' + ), method: 'POST', }, options @@ -3055,52 +3912,69 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.entityTypes.batchUpdate - * @desc Updates/Creates multiple entity types in the specified agent. Operation - * @alias dialogflow.projects.agent.entityTypes.batchUpdate + * dialogflow.projects.agent.search + * @desc Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + * @alias dialogflow.projects.agent.search * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the agent to update or create entity types in. Format: `projects//agent`. - * @param {().GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest} 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 project to list agents 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 */ - batchUpdate( - params?: Params$Resource$Projects$Agent$Entitytypes$Batchupdate, + search( + params?: Params$Resource$Projects$Agent$Search, options?: MethodOptions - ): GaxiosPromise; - batchUpdate( - params: Params$Resource$Projects$Agent$Entitytypes$Batchupdate, + ): GaxiosPromise; + search( + params: Params$Resource$Projects$Agent$Search, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + > ): void; - batchUpdate( - params: Params$Resource$Projects$Agent$Entitytypes$Batchupdate, - callback: BodyResponseCallback + search( + params: Params$Resource$Projects$Agent$Search, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + > ): void; - batchUpdate( - callback: BodyResponseCallback + search( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + > ): void; - batchUpdate( + search( paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Batchupdate - | BodyResponseCallback, + | Params$Resource$Projects$Agent$Search + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + >, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Batchupdate; + {}) as Params$Resource$Projects$Agent$Search; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$Batchupdate; + params = {} as Params$Resource$Projects$Agent$Search; options = {}; } @@ -3113,10 +3987,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: ( - rootUrl + '/v2beta1/{+parent}/entityTypes:batchUpdate' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + url: (rootUrl + '/v2beta1/{+parent}/agent:search').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), @@ -3126,71 +4001,63 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + >(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SearchAgentsResponse + >(parameters); } } /** - * dialogflow.projects.agent.entityTypes.create - * @desc Creates an entity type in the specified agent. - * @alias dialogflow.projects.agent.entityTypes.create + * dialogflow.projects.agent.train + * @desc Trains the specified agent. Operation + * @alias dialogflow.projects.agent.train * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.languageCode Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * @param {string} params.parent Required. The agent to create a entity type for. Format: `projects//agent`. - * @param {().GoogleCloudDialogflowV2beta1EntityType} params.resource Request body data + * @param {string} params.parent Required. The project that the agent to train is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1TrainAgentRequest} params.requestBody 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$Agent$Entitytypes$Create, + train( + params?: Params$Resource$Projects$Agent$Train, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Entitytypes$Create, + ): GaxiosPromise; + train( + params: Params$Resource$Projects$Agent$Train, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Agent$Entitytypes$Create, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > + train( + params: Params$Resource$Projects$Agent$Train, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > + train( + callback: BodyResponseCallback ): void; - create( + train( paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Create - | BodyResponseCallback, - optionsOrCallback?: + | Params$Resource$Projects$Agent$Train + | BodyResponseCallback, + optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Create; + {}) as Params$Resource$Projects$Agent$Train; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$Create; + params = {} as Params$Resource$Projects$Agent$Train; options = {}; } @@ -3203,7 +4070,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/agent:train').replace( /([^:]\/)\/+/g, '$1' ), @@ -3217,143 +4084,71 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( - parameters - ); - } - } - - /** - * dialogflow.projects.agent.entityTypes.delete - * @desc Deletes the specified entity type. - * @alias dialogflow.projects.agent.entityTypes.delete - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. - * @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$Agent$Entitytypes$Delete, - options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Entitytypes$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - delete( - params: Params$Resource$Projects$Agent$Entitytypes$Delete, - callback: BodyResponseCallback - ): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Delete - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$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.context, - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.entityTypes.get - * @desc Retrieves the specified entity type. - * @alias dialogflow.projects.agent.entityTypes.get + * dialogflow.projects.agent.updateFulfillment + * @desc Updates the fulfillment. + * @alias dialogflow.projects.agent.updateFulfillment * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.languageCode Optional. The language to retrieve entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * @param {string} params.name Required. The name of the entity type. Format: `projects//agent/entityTypes/`. + * @param {string} params.name Required. The unique identifier of the fulfillment. Format: `projects//agent/fulfillment`. + * @param {string=} params.updateMask Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. + * @param {().GoogleCloudDialogflowV2beta1Fulfillment} params.requestBody 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$Agent$Entitytypes$Get, + updateFulfillment( + params?: Params$Resource$Projects$Agent$Updatefulfillment, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Entitytypes$Get, + ): GaxiosPromise; + updateFulfillment( + params: Params$Resource$Projects$Agent$Updatefulfillment, options: | MethodOptions - | BodyResponseCallback, + | BodyResponseCallback, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > ): void; - get( - params: Params$Resource$Projects$Agent$Entitytypes$Get, + updateFulfillment( + params: Params$Resource$Projects$Agent$Updatefulfillment, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > ): void; - get( + updateFulfillment( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > ): void; - get( + updateFulfillment( paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Get - | BodyResponseCallback, + | Params$Resource$Projects$Agent$Updatefulfillment + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, + | BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > - ): void | GaxiosPromise { + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Get; + {}) as Params$Resource$Projects$Agent$Updatefulfillment; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$Get; + params = {} as Params$Resource$Projects$Agent$Updatefulfillment; options = {}; } @@ -3367,7 +4162,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -3377,213 +4172,48 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Agent$Export + extends StandardParameters { /** - * dialogflow.projects.agent.entityTypes.list - * @desc Returns the list of all entity types in the specified agent. - * @alias dialogflow.projects.agent.entityTypes.list - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.languageCode Optional. The language to list entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * @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 agent to list all entity types from. Format: `projects//agent`. - * @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 + * Auth client or API Key for the request */ - list( - params?: Params$Resource$Projects$Agent$Entitytypes$List, - options?: MethodOptions - ): GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - >; - list( - params: Params$Resource$Projects$Agent$Entitytypes$List, - options: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - > - ): void; - list( - params: Params$Resource$Projects$Agent$Entitytypes$List, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - > - ): void; - list( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - > - ): void; - list( - paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$List - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - >, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - > { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$List; - options = {}; - } + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Required. The project that the agent to export is associated with. Format: `projects/`. + */ + parent?: string; - const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', - }, - options - ), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context: this.context, - }; - if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - >(parameters, callback); - } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse - >(parameters); - } - } + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ExportAgentRequest; + } + export interface Params$Resource$Projects$Agent$Getfulfillment + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * dialogflow.projects.agent.entityTypes.patch - * @desc Updates the specified entity type. - * @alias dialogflow.projects.agent.entityTypes.patch - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.languageCode Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * @param {string} params.name The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. - * @param {string=} params.updateMask Optional. The mask to control which fields get updated. - * @param {().GoogleCloudDialogflowV2beta1EntityType} 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 + * Required. The name of the fulfillment. Format: `projects//agent/fulfillment`. */ - patch( - params?: Params$Resource$Projects$Agent$Entitytypes$Patch, - options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Entitytypes$Patch, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > - ): void; - patch( - params: Params$Resource$Projects$Agent$Entitytypes$Patch, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > - ): void; - patch( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > - ): void; - patch( - paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Patch - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1EntityType - > - ): void | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Patch; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$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.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback - ); - } else { - return createAPIRequest( - parameters - ); - } - } + name?: string; } - - export interface Params$Resource$Projects$Agent$Entitytypes$Batchdelete + export interface Params$Resource$Projects$Agent$Getvalidationresult extends StandardParameters { /** * Auth client or API Key for the request @@ -3591,16 +4221,15 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + * Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ - parent?: string; - + languageCode?: string; /** - * Request body metadata + * Required. The project that the agent is associated with. Format: `projects/`. */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest; + parent?: string; } - export interface Params$Resource$Projects$Agent$Entitytypes$Batchupdate + export interface Params$Resource$Projects$Agent$Import extends StandardParameters { /** * Auth client or API Key for the request @@ -3608,16 +4237,16 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the agent to update or create entity types in. Format: `projects//agent`. + * Required. The project that the agent to import is associated with. Format: `projects/`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest; + requestBody?: Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest; } - export interface Params$Resource$Projects$Agent$Entitytypes$Create + export interface Params$Resource$Projects$Agent$Restore extends StandardParameters { /** * Auth client or API Key for the request @@ -3625,20 +4254,16 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - */ - languageCode?: string; - /** - * Required. The agent to create a entity type for. Format: `projects//agent`. + * Required. The project that the agent to restore is associated with. Format: `projects/`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1RestoreAgentRequest; } - export interface Params$Resource$Projects$Agent$Entitytypes$Delete + export interface Params$Resource$Projects$Agent$Search extends StandardParameters { /** * Auth client or API Key for the request @@ -3646,27 +4271,19 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. - */ - name?: string; - } - export interface Params$Resource$Projects$Agent$Entitytypes$Get - extends StandardParameters { - /** - * Auth client or API Key for the request + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - + pageSize?: number; /** - * Optional. The language to retrieve entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The next_page_token value returned from a previous list request. */ - languageCode?: string; + pageToken?: string; /** - * Required. The name of the entity type. Format: `projects//agent/entityTypes/`. + * Required. The project to list agents from. Format: `projects/`. */ - name?: string; + parent?: string; } - export interface Params$Resource$Projects$Agent$Entitytypes$List + export interface Params$Resource$Projects$Agent$Train extends StandardParameters { /** * Auth client or API Key for the request @@ -3674,23 +4291,16 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Optional. The language to list entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - */ - languageCode?: string; - /** - * 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. + * Required. The project that the agent to train is associated with. Format: `projects/`. */ - pageToken?: string; + parent?: string; + /** - * Required. The agent to list all entity types from. Format: `projects//agent`. + * Request body metadata */ - parent?: string; + requestBody?: Schema$GoogleCloudDialogflowV2beta1TrainAgentRequest; } - export interface Params$Resource$Projects$Agent$Entitytypes$Patch + export interface Params$Resource$Projects$Agent$Updatefulfillment extends StandardParameters { /** * Auth client or API Key for the request @@ -3698,64 +4308,64 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - */ - languageCode?: string; - /** - * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. + * Required. The unique identifier of the fulfillment. Format: `projects//agent/fulfillment`. */ name?: string; /** - * Optional. The mask to control which fields get updated. + * Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. */ updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1Fulfillment; } - export class Resource$Projects$Agent$Entitytypes$Entities { + export class Resource$Projects$Agent$Entitytypes { context: APIRequestContext; + entities: Resource$Projects$Agent$Entitytypes$Entities; constructor(context: APIRequestContext) { this.context = context; + this.entities = new Resource$Projects$Agent$Entitytypes$Entities( + this.context + ); } /** - * dialogflow.projects.agent.entityTypes.entities.batchCreate - * @desc Creates multiple new entities in the specified entity type. Operation - * @alias dialogflow.projects.agent.entityTypes.entities.batchCreate + * dialogflow.projects.agent.entityTypes.batchDelete + * @desc Deletes entity types in the specified agent. Operation + * @alias dialogflow.projects.agent.entityTypes.batchDelete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. - * @param {().GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest} params.resource Request body data + * @param {string} params.parent Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest} params.requestBody 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 */ - batchCreate( - params?: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate, + batchDelete( + params?: Params$Resource$Projects$Agent$Entitytypes$Batchdelete, options?: MethodOptions ): GaxiosPromise; - batchCreate( - params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate, + batchDelete( + params: Params$Resource$Projects$Agent$Entitytypes$Batchdelete, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchCreate( - params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate, + batchDelete( + params: Params$Resource$Projects$Agent$Entitytypes$Batchdelete, callback: BodyResponseCallback ): void; - batchCreate( + batchDelete( callback: BodyResponseCallback ): void; - batchCreate( + batchDelete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate + | Params$Resource$Projects$Agent$Entitytypes$Batchdelete | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -3763,12 +4373,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate; + {}) as Params$Resource$Projects$Agent$Entitytypes$Batchdelete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Batchdelete; options = {}; } @@ -3781,10 +4391,9 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entities:batchCreate').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: ( + rootUrl + '/v2beta1/{+parent}/entityTypes:batchDelete' + ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options @@ -3805,39 +4414,39 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.entityTypes.entities.batchDelete - * @desc Deletes entities in the specified entity type. Operation - * @alias dialogflow.projects.agent.entityTypes.entities.batchDelete + * dialogflow.projects.agent.entityTypes.batchUpdate + * @desc Updates/Creates multiple entity types in the specified agent. Operation + * @alias dialogflow.projects.agent.entityTypes.batchUpdate * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. - * @param {().GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest} params.resource Request body data + * @param {string} params.parent Required. The name of the agent to update or create entity types in. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest} params.requestBody 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 */ - batchDelete( - params?: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete, + batchUpdate( + params?: Params$Resource$Projects$Agent$Entitytypes$Batchupdate, options?: MethodOptions ): GaxiosPromise; - batchDelete( - params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete, + batchUpdate( + params: Params$Resource$Projects$Agent$Entitytypes$Batchupdate, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete, + batchUpdate( + params: Params$Resource$Projects$Agent$Entitytypes$Batchupdate, callback: BodyResponseCallback ): void; - batchDelete( + batchUpdate( callback: BodyResponseCallback ): void; - batchDelete( + batchUpdate( paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete + | Params$Resource$Projects$Agent$Entitytypes$Batchupdate | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -3845,12 +4454,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete; + {}) as Params$Resource$Projects$Agent$Entitytypes$Batchupdate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Batchupdate; options = {}; } @@ -3863,10 +4472,9 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entities:batchDelete').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: ( + rootUrl + '/v2beta1/{+parent}/entityTypes:batchUpdate' + ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options @@ -3887,52 +4495,61 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.entityTypes.entities.batchUpdate - * @desc Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation - * @alias dialogflow.projects.agent.entityTypes.entities.batchUpdate + * dialogflow.projects.agent.entityTypes.create + * @desc Creates an entity type in the specified agent. + * @alias dialogflow.projects.agent.entityTypes.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. - * @param {().GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest} params.resource Request body data + * @param {string=} params.languageCode Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.parent Required. The agent to create a entity type for. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1EntityType} params.requestBody 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 */ - batchUpdate( - params?: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate, + create( + params?: Params$Resource$Projects$Agent$Entitytypes$Create, options?: MethodOptions - ): GaxiosPromise; - batchUpdate( - params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Entitytypes$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - batchUpdate( - params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; - batchUpdate( - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Agent$Entitytypes$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; - batchUpdate( - paramsOrCallback?: - | Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate - | BodyResponseCallback, + create( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Entitytypes$Create + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate; + {}) as Params$Resource$Projects$Agent$Entitytypes$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Create; options = {}; } @@ -3945,7 +4562,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entities:batchUpdate').replace( + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( /([^:]\/)\/+/g, '$1' ), @@ -3959,133 +4576,46 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } - } - - export interface Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest; - } - export interface Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest; - } - export interface Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest; - } - - export class Resource$Projects$Agent$Environments { - context: APIRequestContext; - users: Resource$Projects$Agent$Environments$Users; - constructor(context: APIRequestContext) { - this.context = context; - this.users = new Resource$Projects$Agent$Environments$Users(this.context); - } - } - - export class Resource$Projects$Agent$Environments$Users { - context: APIRequestContext; - sessions: Resource$Projects$Agent$Environments$Users$Sessions; - constructor(context: APIRequestContext) { - this.context = context; - this.sessions = new Resource$Projects$Agent$Environments$Users$Sessions( - this.context - ); - } - } - - export class Resource$Projects$Agent$Environments$Users$Sessions { - context: APIRequestContext; - contexts: Resource$Projects$Agent$Environments$Users$Sessions$Contexts; - entityTypes: Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes; - constructor(context: APIRequestContext) { - this.context = context; - this.contexts = new Resource$Projects$Agent$Environments$Users$Sessions$Contexts( - this.context - ); - this.entityTypes = new Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes( - this.context - ); - } /** - * dialogflow.projects.agent.environments.users.sessions.deleteContexts - * @desc Deletes all active contexts in the specified session. - * @alias dialogflow.projects.agent.environments.users.sessions.deleteContexts + * dialogflow.projects.agent.entityTypes.delete + * @desc Deletes the specified entity type. + * @alias dialogflow.projects.agent.entityTypes.delete * @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.name Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. * @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$Agent$Environments$Users$Sessions$Deletecontexts, + delete( + params?: Params$Resource$Projects$Agent$Entitytypes$Delete, options?: MethodOptions ): GaxiosPromise; - deleteContexts( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts, + delete( + params: Params$Resource$Projects$Agent$Entitytypes$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteContexts( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts, - callback: BodyResponseCallback - ): void; - deleteContexts( + delete( + params: Params$Resource$Projects$Agent$Entitytypes$Delete, callback: BodyResponseCallback ): void; - deleteContexts( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts + | Params$Resource$Projects$Agent$Entitytypes$Delete | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -4093,12 +4623,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts; + {}) as Params$Resource$Projects$Agent$Entitytypes$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Delete; options = {}; } @@ -4111,17 +4641,14 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), method: 'DELETE', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { @@ -4132,68 +4659,60 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.environments.users.sessions.detectIntent - * @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. - * @alias dialogflow.projects.agent.environments.users.sessions.detectIntent + * dialogflow.projects.agent.entityTypes.get + * @desc Retrieves the specified entity type. + * @alias dialogflow.projects.agent.entityTypes.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It’s up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random numbers or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. - * @param {().GoogleCloudDialogflowV2beta1DetectIntentRequest} params.resource Request body data + * @param {string=} params.languageCode Optional. The language to retrieve entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name Required. The name of the entity type. Format: `projects//agent/entityTypes/`. * @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 */ - detectIntent( - params?: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + get( + params?: Params$Resource$Projects$Agent$Entitytypes$Get, options?: MethodOptions - ): GaxiosPromise; - detectIntent( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Entitytypes$Get, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse - >, + | BodyResponseCallback, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1EntityType > ): void; - detectIntent( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + get( + params: Params$Resource$Projects$Agent$Entitytypes$Get, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1EntityType > ): void; - detectIntent( + get( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1EntityType > ): void; - detectIntent( + get( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse - >, + | Params$Resource$Projects$Agent$Entitytypes$Get + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse - >, + | BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1EntityType > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse - > { + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent; + {}) as Params$Resource$Projects$Agent$Entitytypes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Get; options = {}; } @@ -4206,116 +4725,95 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['session'], - pathParams: ['session'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse - >(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse - >(parameters); + return createAPIRequest( + parameters + ); } } - } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts - extends StandardParameters { /** - * Auth client or API Key for the request + * dialogflow.projects.agent.entityTypes.list + * @desc Returns the list of all entity types in the specified agent. + * @alias dialogflow.projects.agent.entityTypes.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.languageCode Optional. The language to list entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @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 agent to list all entity types from. Format: `projects//agent`. + * @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 */ - 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 interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The name of the session this query is sent to. 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 are using "-". It’s up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random numbers or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. - */ - session?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; - } - - export class Resource$Projects$Agent$Environments$Users$Sessions$Contexts { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * dialogflow.projects.agent.environments.users.sessions.contexts.create - * @desc Creates a context. If the specified context already exists, overrides the context. - * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$Create, + list( + params?: Params$Resource$Projects$Agent$Entitytypes$List, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create, + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + >; + list( + params: Params$Resource$Projects$Agent$Entitytypes$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + > ): void; - create( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Agent$Entitytypes$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + > ): void; - create( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + > ): void; - create( + list( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create - | BodyResponseCallback, + | Params$Resource$Projects$Agent$Entitytypes$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + >, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Context + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse > - ): void | GaxiosPromise { + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create; + {}) as Params$Resource$Projects$Agent$Entitytypes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create; + params = {} as Params$Resource$Projects$Agent$Entitytypes$List; options = {}; } @@ -4328,11 +4826,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -4342,136 +4840,73 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); - } else { - return createAPIRequest( - parameters - ); - } - } - - /** - * dialogflow.projects.agent.environments.users.sessions.contexts.delete - * @desc Deletes the specified context. - * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$Delete, - options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - delete( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete, - callback: BodyResponseCallback - ): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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.context, - }; - if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + >(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + >(parameters); } } /** - * dialogflow.projects.agent.environments.users.sessions.contexts.get - * @desc Retrieves the specified context. - * @alias dialogflow.projects.agent.environments.users.sessions.contexts.get + * dialogflow.projects.agent.entityTypes.patch + * @desc Updates the specified entity type. + * @alias dialogflow.projects.agent.entityTypes.patch * @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.languageCode Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1EntityType} params.requestBody 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$Agent$Environments$Users$Sessions$Contexts$Get, + patch( + params?: Params$Resource$Projects$Agent$Entitytypes$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Entitytypes$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; - get( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Agent$Entitytypes$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; - get( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get - | BodyResponseCallback, + | Params$Resource$Projects$Agent$Entitytypes$Patch + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, + | BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Context + Schema$GoogleCloudDialogflowV2beta1EntityType > - ): void | GaxiosPromise { + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get; + {}) as Params$Resource$Projects$Agent$Entitytypes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Patch; options = {}; } @@ -4485,7 +4920,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -4495,81 +4930,6289 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Agent$Entitytypes$Batchdelete + extends StandardParameters { /** - * dialogflow.projects.agent.environments.users.sessions.contexts.list - * @desc Returns the list of all contexts in the specified session. - * @alias dialogflow.projects.agent.environments.users.sessions.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. + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest; + } + export interface Params$Resource$Projects$Agent$Entitytypes$Batchupdate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the agent to update or create entity types in. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest; + } + export interface Params$Resource$Projects$Agent$Entitytypes$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The agent to create a entity type for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; + } + export interface Params$Resource$Projects$Agent$Entitytypes$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Entitytypes$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The language to retrieve entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The name of the entity type. Format: `projects//agent/entityTypes/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Entitytypes$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The language to list entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * 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 agent to list all entity types from. Format: `projects//agent`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Agent$Entitytypes$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; + } + + export class Resource$Projects$Agent$Entitytypes$Entities { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.entityTypes.entities.batchCreate + * @desc Creates multiple new entities in the specified entity type. Operation + * @alias dialogflow.projects.agent.entityTypes.entities.batchCreate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. + * @param {().GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest} params.requestBody 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 + */ + batchCreate( + params?: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate, + options?: MethodOptions + ): GaxiosPromise; + batchCreate( + params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreate( + params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate, + callback: BodyResponseCallback + ): void; + batchCreate( + callback: BodyResponseCallback + ): void; + batchCreate( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate; + 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}/entities:batchCreate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.entityTypes.entities.batchDelete + * @desc Deletes entities in the specified entity type. Operation + * @alias dialogflow.projects.agent.entityTypes.entities.batchDelete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. + * @param {().GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest} params.requestBody 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 + */ + batchDelete( + params?: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete; + 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}/entities:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.entityTypes.entities.batchUpdate + * @desc Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation + * @alias dialogflow.projects.agent.entityTypes.entities.batchUpdate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. + * @param {().GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest} params.requestBody 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 + */ + batchUpdate( + params?: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate; + 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}/entities:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Entitytypes$Entities$Batchcreate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest; + } + export interface Params$Resource$Projects$Agent$Entitytypes$Entities$Batchdelete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest; + } + export interface Params$Resource$Projects$Agent$Entitytypes$Entities$Batchupdate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest; + } + + export class Resource$Projects$Agent$Environments { + context: APIRequestContext; + users: Resource$Projects$Agent$Environments$Users; + constructor(context: APIRequestContext) { + this.context = context; + this.users = new Resource$Projects$Agent$Environments$Users(this.context); + } + } + + export class Resource$Projects$Agent$Environments$Users { + context: APIRequestContext; + sessions: Resource$Projects$Agent$Environments$Users$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.sessions = new Resource$Projects$Agent$Environments$Users$Sessions( + this.context + ); + } + } + + export class Resource$Projects$Agent$Environments$Users$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Agent$Environments$Users$Sessions$Contexts; + entityTypes: Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Agent$Environments$Users$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes( + this.context + ); + } + + /** + * dialogflow.projects.agent.environments.users.sessions.deleteContexts + * @desc Deletes all active contexts in the specified session. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.detectIntent + * @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. + * @alias dialogflow.projects.agent.environments.users.sessions.detectIntent + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + * @param {().GoogleCloudDialogflowV2beta1DetectIntentRequest} params.requestBody 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 + */ + detectIntent( + params?: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void; + detectIntent( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void; + detectIntent( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Deletecontexts + extends StandardParameters { + /** + * 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 interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Detectintent + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; + } + + export class Resource$Projects$Agent$Environments$Users$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.create + * @desc Creates a context. If the specified context already exists, overrides the context. + * @alias dialogflow.projects.agent.environments.users.sessions.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.requestBody 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$Agent$Environments$Users$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.delete + * @desc Deletes the specified context. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.get + * @desc Retrieves the specified context. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.list + * @desc Returns the list of all contexts in the specified session. + * @alias dialogflow.projects.agent.environments.users.sessions.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$Agent$Environments$Users$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.contexts.patch + * @desc Updates the specified context. + * @alias dialogflow.projects.agent.environments.users.sessions.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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Context} params.requestBody 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$Agent$Environments$Users$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create + extends StandardParameters { + /** + * 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$Agent$Environments$Users$Sessions$Contexts$Delete + extends StandardParameters { + /** + * 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$Agent$Environments$Users$Sessions$Contexts$Get + extends StandardParameters { + /** + * 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$Agent$Environments$Users$Sessions$Contexts$List + extends StandardParameters { + /** + * 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$Agent$Environments$Users$Sessions$Contexts$Patch + extends StandardParameters { + /** + * 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + + export class Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.create + * @desc Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2beta1SessionEntityType} params.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + create( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + create( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$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}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.delete + * @desc Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the entity type to delete. 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 {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$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.get + * @desc Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the 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 {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$Agent$Environments$Users$Sessions$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + get( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.list + * @desc Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.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 session entity types 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$Agent$Environments$Users$Sessions$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$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}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.environments.users.sessions.entityTypes.patch + * @desc Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.patch + * @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. `` 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.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + patch( + params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + patch( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The session to create a session entity type 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$GoogleCloudDialogflowV2beta1SessionEntityType; + } + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to delete. 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List + extends StandardParameters { + /** + * 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 session entity types 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$Agent$Environments$Users$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * 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. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + } + + export class Resource$Projects$Agent$Intents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.intents.batchDelete + * @desc Deletes intents in the specified agent. Operation + * @alias dialogflow.projects.agent.intents.batchDelete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest} params.requestBody 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 + */ + batchDelete( + params?: Params$Resource$Projects$Agent$Intents$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Agent$Intents$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Agent$Intents$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Intents$Batchdelete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Intents$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Intents$Batchdelete; + 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}/intents:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.intents.batchUpdate + * @desc Updates/Creates multiple intents in the specified agent. Operation + * @alias dialogflow.projects.agent.intents.batchUpdate + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the agent to update or create intents in. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest} params.requestBody 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 + */ + batchUpdate( + params?: Params$Resource$Projects$Agent$Intents$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Agent$Intents$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Agent$Intents$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Intents$Batchupdate + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Intents$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Intents$Batchupdate; + 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}/intents:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.intents.create + * @desc Creates an intent in the specified agent. + * @alias dialogflow.projects.agent.intents.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.parent Required. The agent to create a intent for. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1Intent} params.requestBody 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$Agent$Intents$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Intents$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Intents$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Intents$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Intents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Intents$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}/intents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.intents.delete + * @desc Deletes the specified intent and its direct or indirect followup intents. + * @alias dialogflow.projects.agent.intents.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. + * @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$Agent$Intents$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Intents$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Intents$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Intents$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Intents$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Intents$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.intents.get + * @desc Retrieves the specified intent. + * @alias dialogflow.projects.agent.intents.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name Required. The name of the intent. Format: `projects//agent/intents/`. + * @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$Agent$Intents$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Intents$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Intents$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Intents$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Intents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Intents$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.intents.list + * @desc Returns the list of all intents in the specified agent. + * @alias dialogflow.projects.agent.intents.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @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 agent to list all intents from. Format: `projects//agent`. + * @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$Agent$Intents$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Intents$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Intents$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Intents$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Intents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Intents$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}/intents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.intents.patch + * @desc Updates the specified intent. + * @alias dialogflow.projects.agent.intents.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Intent} params.requestBody 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$Agent$Intents$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Intents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Intents$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Intents$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Intents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Intents$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Agent$Intents$Batchdelete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest; + } + export interface Params$Resource$Projects$Agent$Intents$Batchupdate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the agent to update or create intents in. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest; + } + export interface Params$Resource$Projects$Agent$Intents$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The agent to create a intent for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + } + export interface Params$Resource$Projects$Agent$Intents$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Intents$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The name of the intent. Format: `projects//agent/intents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Intents$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * 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 agent to list all intents from. Format: `projects//agent`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Agent$Intents$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + } + + export class Resource$Projects$Agent$Knowledgebases { + context: APIRequestContext; + documents: Resource$Projects$Agent$Knowledgebases$Documents; + constructor(context: APIRequestContext) { + this.context = context; + this.documents = new Resource$Projects$Agent$Knowledgebases$Documents( + this.context + ); + } + + /** + * dialogflow.projects.agent.knowledgeBases.create + * @desc Creates a knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @alias dialogflow.projects.agent.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.requestBody 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$Agent$Knowledgebases$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Create, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + create( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Create + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.delete + * @desc Deletes the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @alias dialogflow.projects.agent.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$Agent$Knowledgebases$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.get + * @desc Retrieves the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @alias dialogflow.projects.agent.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$Agent$Knowledgebases$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Get, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Get + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.list + * @desc Returns the list of all knowledge bases of the specified agent. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @alias dialogflow.projects.agent.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$Agent$Knowledgebases$List, + options?: MethodOptions + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >; + list( + params: Params$Resource$Projects$Agent$Knowledgebases$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Knowledgebases$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.patch + * @desc Updates the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @alias dialogflow.projects.agent.knowledgeBases.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. + * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * @param {().GoogleCloudDialogflowV2beta1KnowledgeBase} params.requestBody 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$Agent$Knowledgebases$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Patch, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + patch( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Patch + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Knowledgebases$Create + extends StandardParameters { + /** + * 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$Agent$Knowledgebases$Delete + extends StandardParameters { + /** + * 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$Agent$Knowledgebases$Get + extends StandardParameters { + /** + * 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$Agent$Knowledgebases$List + extends StandardParameters { + /** + * 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 interface Params$Resource$Projects$Agent$Knowledgebases$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; + } + + export class Resource$Projects$Agent$Knowledgebases$Documents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.knowledgeBases.documents.create + * @desc Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.agent.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.requestBody 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$Agent$Knowledgebases$Documents$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.documents.delete + * @desc Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.agent.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$Agent$Knowledgebases$Documents$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, + callback: BodyResponseCallback + ): void; + delete( + callback: BodyResponseCallback + ): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.documents.get + * @desc Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.agent.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$Agent$Knowledgebases$Documents$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void; + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void; + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.documents.list + * @desc Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.agent.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$Agent$Knowledgebases$Documents$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$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.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.documents.patch + * @desc Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.agent.knowledgeBases.documents.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. + * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * @param {().GoogleCloudDialogflowV2beta1Document} params.requestBody 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$Agent$Knowledgebases$Documents$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.knowledgeBases.documents.reload + * @desc Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.agent.knowledgeBases.documents.reload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the document to reload. Format: `projects//knowledgeBases//documents/` + * @param {().GoogleCloudDialogflowV2beta1ReloadDocumentRequest} params.requestBody 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 + */ + reload( + params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + options?: MethodOptions + ): GaxiosPromise; + reload( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reload( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + callback: BodyResponseCallback + ): void; + reload( + callback: BodyResponseCallback + ): void; + reload( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload; + 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}:reload').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Create + extends StandardParameters { + /** + * 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$Agent$Knowledgebases$Documents$Delete + extends StandardParameters { + /** + * 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$Agent$Knowledgebases$Documents$Get + extends StandardParameters { + /** + * 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$Agent$Knowledgebases$Documents$List + extends StandardParameters { + /** + * 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 interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the document to reload. Format: `projects//knowledgeBases//documents/` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest; + } + + export class Resource$Projects$Agent$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Agent$Sessions$Contexts; + entityTypes: Resource$Projects$Agent$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Agent$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Agent$Sessions$Entitytypes( + this.context + ); + } + + /** + * dialogflow.projects.agent.sessions.deleteContexts + * @desc Deletes all active contexts in the specified session. + * @alias dialogflow.projects.agent.sessions.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$Agent$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Deletecontexts + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.sessions.detectIntent + * @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. + * @alias dialogflow.projects.agent.sessions.detectIntent + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + * @param {().GoogleCloudDialogflowV2beta1DetectIntentRequest} params.requestBody 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 + */ + detectIntent( + params?: Params$Resource$Projects$Agent$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Agent$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void; + detectIntent( + params: Params$Resource$Projects$Agent$Sessions$Detectintent, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void; + detectIntent( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Detectintent + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Sessions$Deletecontexts + extends StandardParameters { + /** + * 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 interface Params$Resource$Projects$Agent$Sessions$Detectintent + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; + } + + export class Resource$Projects$Agent$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.sessions.contexts.create + * @desc Creates a context. If the specified context already exists, overrides the context. + * @alias dialogflow.projects.agent.sessions.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.requestBody 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$Agent$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.sessions.contexts.delete + * @desc Deletes the specified context. + * @alias dialogflow.projects.agent.sessions.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$Agent$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.sessions.contexts.get + * @desc Retrieves the specified context. + * @alias dialogflow.projects.agent.sessions.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$Agent$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.agent.sessions.contexts.list + * @desc Returns the list of all contexts in the specified session. + * @alias dialogflow.projects.agent.sessions.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$Agent$Environments$Users$Sessions$Contexts$List, + list( + params?: Params$Resource$Projects$Agent$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.sessions.contexts.patch + * @desc Updates the specified context. + * @alias dialogflow.projects.agent.sessions.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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Context} params.requestBody 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$Agent$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Agent$Sessions$Contexts$Create + extends StandardParameters { + /** + * 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$Agent$Sessions$Contexts$Delete + extends StandardParameters { + /** + * 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$Agent$Sessions$Contexts$Get + extends StandardParameters { + /** + * 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$Agent$Sessions$Contexts$List + extends StandardParameters { + /** + * 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$Agent$Sessions$Contexts$Patch + extends StandardParameters { + /** + * 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + + export class Resource$Projects$Agent$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.agent.sessions.entityTypes.create + * @desc Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.sessions.entityTypes.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2beta1SessionEntityType} params.requestBody 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$Agent$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + create( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + create( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Create + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$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}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); + } + } + + /** + * dialogflow.projects.agent.sessions.entityTypes.delete + * @desc Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.sessions.entityTypes.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the entity type to delete. 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 {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$Agent$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.agent.sessions.entityTypes.get + * @desc Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.sessions.entityTypes.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the 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 {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$Agent$Sessions$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + get( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Get + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); + } + } + + /** + * dialogflow.projects.agent.sessions.entityTypes.list + * @desc Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.sessions.entityTypes.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 session entity types 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$Agent$Sessions$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >; + list( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void; + list( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$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}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters); + } + } + + /** + * dialogflow.projects.agent.sessions.entityTypes.patch + * @desc Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.agent.sessions.entityTypes.patch + * @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. `` 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.requestBody 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$Agent$Sessions$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + patch( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + patch( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The session to create a session entity type 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$GoogleCloudDialogflowV2beta1SessionEntityType; + } + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to delete. 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$List + extends StandardParameters { + /** + * 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 session entity types 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$Agent$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * 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. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + } + + export class Resource$Projects$Knowledgebases { + context: APIRequestContext; + documents: Resource$Projects$Knowledgebases$Documents; + constructor(context: APIRequestContext) { + this.context = context; + this.documents = new Resource$Projects$Knowledgebases$Documents( + this.context + ); + } + + /** + * dialogflow.projects.knowledgeBases.create + * @desc Creates a knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @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.requestBody 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 + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Knowledgebases$Create, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + 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< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void | GaxiosPromise { + 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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >(parameters); + } + } + + /** + * dialogflow.projects.knowledgeBases.delete + * @desc Deletes the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @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 + ): GaxiosPromise; + 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 | GaxiosPromise { + 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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.knowledgeBases.get + * @desc Retrieves the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @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 + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Knowledgebases$Get, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + 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< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void | GaxiosPromise { + 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.context, + }; + 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. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @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 + ): GaxiosPromise< + 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 | GaxiosPromise< + 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.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + >(parameters); + } + } + + /** + * dialogflow.projects.knowledgeBases.patch + * @desc Updates the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @alias dialogflow.projects.knowledgeBases.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. + * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * @param {().GoogleCloudDialogflowV2beta1KnowledgeBase} params.requestBody 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$Knowledgebases$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Knowledgebases$Patch, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + patch( + params: Params$Resource$Projects$Knowledgebases$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + patch( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Patch + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + >(parameters); + } + } + } + + export interface Params$Resource$Projects$Knowledgebases$Create + extends StandardParameters { + /** + * 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 + extends StandardParameters { + /** + * 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 + extends StandardParameters { + /** + * 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 + extends StandardParameters { + /** + * 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 interface Params$Resource$Projects$Knowledgebases$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; + } + + export class Resource$Projects$Knowledgebases$Documents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.knowledgeBases.documents.create + * @desc Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @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.requestBody 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 + ): GaxiosPromise; + 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 | GaxiosPromise { + 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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.knowledgeBases.documents.delete + * @desc Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @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 + ): GaxiosPromise; + 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 | GaxiosPromise { + 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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.knowledgeBases.documents.get + * @desc Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @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 + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void; + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void; + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Document + > + ): void | GaxiosPromise { + 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.context, + }; + 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. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @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 + ): GaxiosPromise; + 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 | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + > { + 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.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + >(parameters); + } + } + + /** + * dialogflow.projects.knowledgeBases.documents.patch + * @desc Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.knowledgeBases.documents.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. + * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * @param {().GoogleCloudDialogflowV2beta1Document} params.requestBody 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$Knowledgebases$Documents$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.knowledgeBases.documents.reload + * @desc Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * @alias dialogflow.projects.knowledgeBases.documents.reload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the document to reload. Format: `projects//knowledgeBases//documents/` + * @param {().GoogleCloudDialogflowV2beta1ReloadDocumentRequest} params.requestBody 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 + */ + reload( + params?: Params$Resource$Projects$Knowledgebases$Documents$Reload, + options?: MethodOptions + ): GaxiosPromise; + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + callback: BodyResponseCallback + ): void; + reload( + callback: BodyResponseCallback + ): void; + reload( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Reload + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$Reload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Reload; + 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}:reload').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Knowledgebases$Documents$Create + extends StandardParameters { + /** + * 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 + extends StandardParameters { + /** + * 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 + extends StandardParameters { + /** + * 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 + extends StandardParameters { + /** + * 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 interface Params$Resource$Projects$Knowledgebases$Documents$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Reload + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the document to reload. Format: `projects//knowledgeBases//documents/` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest; + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + agent: Resource$Projects$Locations$Agent; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.agent = new Resource$Projects$Locations$Agent(this.context); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * dialogflow.projects.locations.deleteAgent + * @desc Deletes the specified agent. + * @alias dialogflow.projects.locations.deleteAgent + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project that the agent to delete is associated with. 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 + */ + deleteAgent( + params?: Params$Resource$Projects$Locations$Deleteagent, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List, + ): GaxiosPromise; + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, + callback: BodyResponseCallback + ): void; + deleteAgent( + callback: BodyResponseCallback + ): void; + deleteAgent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Deleteagent + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Deleteagent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Deleteagent; + 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}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.locations.getAgent + * @desc Retrieves the specified agent. + * @alias dialogflow.projects.locations.getAgent + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project that the agent to fetch is associated with. 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 + */ + getAgent( + params?: Params$Resource$Projects$Locations$Getagent, + options?: MethodOptions + ): GaxiosPromise; + getAgent( + params: Params$Resource$Projects$Locations$Getagent, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > + getAgent( + params: Params$Resource$Projects$Locations$Getagent, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > + getAgent( + callback: BodyResponseCallback ): void; - list( + getAgent( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >, + | Params$Resource$Projects$Locations$Getagent + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List; + {}) as Params$Resource$Projects$Locations$Getagent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$List; + params = {} as Params$Resource$Projects$Locations$Getagent; options = {}; } @@ -4582,7 +11225,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/agent').replace( /([^:]\/)\/+/g, '$1' ), @@ -4596,66 +11239,65 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >(parameters); + return createAPIRequest( + parameters + ); } } /** - * dialogflow.projects.agent.environments.users.sessions.contexts.patch - * @desc Updates the specified context. - * @alias dialogflow.projects.agent.environments.users.sessions.contexts.patch + * dialogflow.projects.locations.setAgent + * @desc Creates/updates the specified agent. + * @alias dialogflow.projects.locations.setAgent * @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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. 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 of this agent. Format: `projects/`. * @param {string=} params.updateMask Optional. The mask to control which fields get updated. - * @param {().GoogleCloudDialogflowV2beta1Context} params.resource Request body data + * @param {().GoogleCloudDialogflowV2beta1Agent} params.requestBody 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$Agent$Environments$Users$Sessions$Contexts$Patch, + setAgent( + params?: Params$Resource$Projects$Locations$Setagent, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch, + ): GaxiosPromise; + setAgent( + params: Params$Resource$Projects$Locations$Setagent, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch, - callback: BodyResponseCallback + setAgent( + params: Params$Resource$Projects$Locations$Setagent, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + setAgent( + callback: BodyResponseCallback ): void; - patch( + setAgent( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Setagent + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Context - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch; + {}) as Params$Resource$Projects$Locations$Setagent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch; + params = {} as Params$Resource$Projects$Locations$Setagent; options = {}; } @@ -4668,30 +11310,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v2beta1/{+parent}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Create + export interface Params$Resource$Projects$Locations$Deleteagent extends StandardParameters { /** * Auth client or API Key for the request @@ -4699,40 +11344,11 @@ export namespace dialogflow_v2beta1 { 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 that the agent to delete is associated with. Format: `projects/`. */ parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; - } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Delete - extends StandardParameters { - /** - * 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$Agent$Environments$Users$Sessions$Contexts$Get - extends StandardParameters { - /** - * 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$Agent$Environments$Users$Sessions$Contexts$List + export interface Params$Resource$Projects$Locations$Getagent extends StandardParameters { /** * Auth client or API Key for the request @@ -4740,19 +11356,11 @@ export namespace dialogflow_v2beta1 { 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. + * Required. The project that the agent to fetch is associated with. Format: `projects/`. */ parent?: string; } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Contexts$Patch + export interface Params$Resource$Projects$Locations$Setagent extends StandardParameters { /** * Auth client or API Key for the request @@ -4760,9 +11368,9 @@ export namespace dialogflow_v2beta1 { 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The project of this agent. Format: `projects/`. */ - name?: string; + parent?: string; /** * Optional. The mask to control which fields get updated. */ @@ -4771,78 +11379,169 @@ export namespace dialogflow_v2beta1 { /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + requestBody?: Schema$GoogleCloudDialogflowV2beta1Agent; } - export class Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes { + export class Resource$Projects$Locations$Agent { context: APIRequestContext; + entityTypes: Resource$Projects$Locations$Agent$Entitytypes; + environments: Resource$Projects$Locations$Agent$Environments; + intents: Resource$Projects$Locations$Agent$Intents; + sessions: Resource$Projects$Locations$Agent$Sessions; constructor(context: APIRequestContext) { this.context = context; + this.entityTypes = new Resource$Projects$Locations$Agent$Entitytypes( + this.context + ); + this.environments = new Resource$Projects$Locations$Agent$Environments( + this.context + ); + this.intents = new Resource$Projects$Locations$Agent$Intents( + this.context + ); + this.sessions = new Resource$Projects$Locations$Agent$Sessions( + this.context + ); } /** - * dialogflow.projects.agent.environments.users.sessions.entityTypes.create - * @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 + * dialogflow.projects.locations.agent.export + * @desc Exports the specified agent to a ZIP file. Operation + * @alias dialogflow.projects.locations.agent.export * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2beta1SessionEntityType} params.resource Request body data + * @param {string} params.parent Required. The project that the agent to export is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1ExportAgentRequest} params.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$Create, + export( + params?: Params$Resource$Projects$Locations$Agent$Export, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create, + ): GaxiosPromise; + export( + params: Params$Resource$Projects$Locations$Agent$Export, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + export( + params: Params$Resource$Projects$Locations$Agent$Export, + callback: BodyResponseCallback + ): void; + export( + callback: BodyResponseCallback + ): void; + export( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Export + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Export; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Export; + 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}/agent:export').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.locations.agent.fulfillment + * @desc Updates the fulfillment. + * @alias dialogflow.projects.locations.agent.fulfillment + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique identifier of the fulfillment. Format: `projects//agent/fulfillment`. + * @param {string=} params.updateMask Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. + * @param {().GoogleCloudDialogflowV2beta1Fulfillment} params.requestBody 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 + */ + fulfillment( + params?: Params$Resource$Projects$Locations$Agent$Fulfillment, + options?: MethodOptions + ): GaxiosPromise; + fulfillment( + params: Params$Resource$Projects$Locations$Agent$Fulfillment, + options: + | MethodOptions + | BodyResponseCallback, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > ): void; - create( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create, + fulfillment( + params: Params$Resource$Projects$Locations$Agent$Fulfillment, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > ): void; - create( + fulfillment( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > ): void; - create( + fulfillment( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, + | Params$Resource$Projects$Locations$Agent$Fulfillment + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, + | BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1Fulfillment > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > { + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create; + {}) as Params$Resource$Projects$Locations$Agent$Fulfillment; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Fulfillment; options = {}; } @@ -4855,73 +11554,82 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >(parameters); + return createAPIRequest( + parameters + ); } } /** - * dialogflow.projects.agent.environments.users.sessions.entityTypes.delete - * @desc Deletes the specified session entity type. - * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.delete + * dialogflow.projects.locations.agent.getFulfillment + * @desc Retrieves the fulfillment. + * @alias dialogflow.projects.locations.agent.getFulfillment * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the entity type to delete. 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 name of the fulfillment. Format: `projects//agent/fulfillment`. * @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$Agent$Environments$Users$Sessions$Entitytypes$Delete, + getFulfillment( + params?: Params$Resource$Projects$Locations$Agent$Getfulfillment, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + ): GaxiosPromise; + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > ): void; - delete( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete, - callback: BodyResponseCallback + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > ): void; - delete(callback: BodyResponseCallback): void; - delete( + getFulfillment( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > + ): void; + getFulfillment( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Getfulfillment + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Fulfillment + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Getfulfillment; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Getfulfillment; options = {}; } @@ -4935,7 +11643,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'GET', }, options ), @@ -4945,74 +11653,64 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * dialogflow.projects.agent.environments.users.sessions.entityTypes.get - * @desc Retrieves the specified session entity type. - * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.get + * dialogflow.projects.locations.agent.import + * @desc Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. Operation + * @alias dialogflow.projects.locations.agent.import * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the 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.parent Required. The project that the agent to import is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1ImportAgentRequest} params.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$Get, + import( + params?: Params$Resource$Projects$Locations$Agent$Import, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get, + ): GaxiosPromise; + import( + params: Params$Resource$Projects$Locations$Agent$Import, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > + import( + params: Params$Resource$Projects$Locations$Agent$Import, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > + import( + callback: BodyResponseCallback ): void; - get( + import( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, + | Params$Resource$Projects$Locations$Agent$Import + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get; + {}) as Params$Resource$Projects$Locations$Agent$Import; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get; + params = {} as Params$Resource$Projects$Locations$Agent$Import; options = {}; } @@ -5025,94 +11723,76 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + url: (rootUrl + '/v2beta1/{+parent}/agent:import').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.environments.users.sessions.entityTypes.list - * @desc Returns the list of all session entity types in the specified session. - * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.list + * dialogflow.projects.locations.agent.restore + * @desc Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. Operation + * @alias dialogflow.projects.locations.agent.restore * @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 session entity types 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 that the agent to restore is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1RestoreAgentRequest} params.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$List, + restore( + params?: Params$Resource$Projects$Locations$Agent$Restore, options?: MethodOptions - ): GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >; - list( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List, + ): GaxiosPromise; + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > + restore( + callback: BodyResponseCallback ): void; - list( + restore( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >, + | Params$Resource$Projects$Locations$Agent$Restore + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List; + {}) as Params$Resource$Projects$Locations$Agent$Restore; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List; + params = {} as Params$Resource$Projects$Locations$Agent$Restore; options = {}; } @@ -5125,11 +11805,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/agent:restore').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -5139,80 +11819,62 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.environments.users.sessions.entityTypes.patch - * @desc Updates the specified session entity type. - * @alias dialogflow.projects.agent.environments.users.sessions.entityTypes.patch + * dialogflow.projects.locations.agent.train + * @desc Trains the specified agent. Operation + * @alias dialogflow.projects.locations.agent.train * @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. `` 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 {string} params.parent Required. The project that the agent to train is associated with. Format: `projects/`. + * @param {().GoogleCloudDialogflowV2beta1TrainAgentRequest} params.requestBody 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$Agent$Environments$Users$Sessions$Entitytypes$Patch, + train( + params?: Params$Resource$Projects$Locations$Agent$Train, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch, + ): GaxiosPromise; + train( + params: Params$Resource$Projects$Locations$Agent$Train, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > + train( + params: Params$Resource$Projects$Locations$Agent$Train, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > + train( + callback: BodyResponseCallback ): void; - patch( + train( paramsOrCallback?: - | Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, + | Params$Resource$Projects$Locations$Agent$Train + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Train; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Train; options = {}; } @@ -5225,30 +11887,31 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v2beta1/{+parent}/agent:train').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Create + export interface Params$Resource$Projects$Locations$Agent$Export extends StandardParameters { /** * Auth client or API Key for the request @@ -5256,16 +11919,16 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The session to create a session entity type 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 that the agent to export is associated with. Format: `projects/`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1ExportAgentRequest; } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Delete + export interface Params$Resource$Projects$Locations$Agent$Fulfillment extends StandardParameters { /** * Auth client or API Key for the request @@ -5273,11 +11936,20 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the entity type to delete. 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. + * Required. The unique identifier of the fulfillment. Format: `projects//agent/fulfillment`. */ name?: string; + /** + * Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Fulfillment; } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Get + export interface Params$Resource$Projects$Locations$Agent$Getfulfillment extends StandardParameters { /** * Auth client or API Key for the request @@ -5285,11 +11957,11 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the 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. + * Required. The name of the fulfillment. Format: `projects//agent/fulfillment`. */ name?: string; } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$List + export interface Params$Resource$Projects$Locations$Agent$Import extends StandardParameters { /** * Auth client or API Key for the request @@ -5297,19 +11969,33 @@ export namespace dialogflow_v2beta1 { 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. + * Required. The project that the agent to import is associated with. Format: `projects/`. */ - pageSize?: number; + parent?: string; + /** - * Optional. The next_page_token value returned from a previous list request. + * Request body metadata */ - pageToken?: string; + requestBody?: Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Restore + extends StandardParameters { /** - * Required. The session to list all session entity types 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. + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The project that the agent to restore is associated with. Format: `projects/`. */ parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1RestoreAgentRequest; } - export interface Params$Resource$Projects$Agent$Environments$Users$Sessions$Entitytypes$Patch + export interface Params$Resource$Projects$Locations$Agent$Train extends StandardParameters { /** * Auth client or API Key for the request @@ -5317,52 +12003,52 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * 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. - */ - name?: string; - /** - * Optional. The mask to control which fields get updated. + * Required. The project that the agent to train is associated with. Format: `projects/`. */ - updateMask?: string; + parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1TrainAgentRequest; } - export class Resource$Projects$Agent$Intents { + export class Resource$Projects$Locations$Agent$Entitytypes { context: APIRequestContext; + entities: Resource$Projects$Locations$Agent$Entitytypes$Entities; constructor(context: APIRequestContext) { this.context = context; + this.entities = new Resource$Projects$Locations$Agent$Entitytypes$Entities( + this.context + ); } /** - * dialogflow.projects.agent.intents.batchDelete - * @desc Deletes intents in the specified agent. Operation - * @alias dialogflow.projects.agent.intents.batchDelete + * dialogflow.projects.locations.agent.entityTypes.batchDelete + * @desc Deletes entity types in the specified agent. Operation + * @alias dialogflow.projects.locations.agent.entityTypes.batchDelete * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.parent Required. The name of the agent to delete all entities types for. Format: `projects//agent`. - * @param {().GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest} params.resource Request body data + * @param {().GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest} params.requestBody 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 */ batchDelete( - params?: Params$Resource$Projects$Agent$Intents$Batchdelete, + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, options?: MethodOptions ): GaxiosPromise; batchDelete( - params: Params$Resource$Projects$Agent$Intents$Batchdelete, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; batchDelete( - params: Params$Resource$Projects$Agent$Intents$Batchdelete, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, callback: BodyResponseCallback ): void; batchDelete( @@ -5370,7 +12056,7 @@ export namespace dialogflow_v2beta1 { ): void; batchDelete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Intents$Batchdelete + | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -5378,12 +12064,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Intents$Batchdelete; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Intents$Batchdelete; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; options = {}; } @@ -5396,10 +12082,9 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents:batchDelete').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: ( + rootUrl + '/v2beta1/{+parent}/entityTypes:batchDelete' + ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options @@ -5420,31 +12105,31 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.intents.batchUpdate - * @desc Updates/Creates multiple intents in the specified agent. Operation - * @alias dialogflow.projects.agent.intents.batchUpdate + * dialogflow.projects.locations.agent.entityTypes.batchUpdate + * @desc Updates/Creates multiple entity types in the specified agent. Operation + * @alias dialogflow.projects.locations.agent.entityTypes.batchUpdate * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The name of the agent to update or create intents in. Format: `projects//agent`. - * @param {().GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest} params.resource Request body data + * @param {string} params.parent Required. The name of the agent to update or create entity types in. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest} params.requestBody 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 */ batchUpdate( - params?: Params$Resource$Projects$Agent$Intents$Batchupdate, + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, options?: MethodOptions ): GaxiosPromise; batchUpdate( - params: Params$Resource$Projects$Agent$Intents$Batchupdate, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; batchUpdate( - params: Params$Resource$Projects$Agent$Intents$Batchupdate, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, callback: BodyResponseCallback ): void; batchUpdate( @@ -5452,7 +12137,7 @@ export namespace dialogflow_v2beta1 { ): void; batchUpdate( paramsOrCallback?: - | Params$Resource$Projects$Agent$Intents$Batchupdate + | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -5460,12 +12145,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Intents$Batchupdate; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Intents$Batchupdate; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; options = {}; } @@ -5478,10 +12163,9 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents:batchUpdate').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: ( + rootUrl + '/v2beta1/{+parent}/entityTypes:batchUpdate' + ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options @@ -5502,54 +12186,61 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.intents.create - * @desc Creates an intent in the specified agent. - * @alias dialogflow.projects.agent.intents.create + * dialogflow.projects.locations.agent.entityTypes.create + * @desc Creates an entity type in the specified agent. + * @alias dialogflow.projects.locations.agent.entityTypes.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. - * @param {string=} params.languageCode Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * @param {string} params.parent Required. The agent to create a intent for. Format: `projects//agent`. - * @param {().GoogleCloudDialogflowV2beta1Intent} params.resource Request body data + * @param {string=} params.languageCode Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.parent Required. The agent to create a entity type for. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1EntityType} params.requestBody 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$Agent$Intents$Create, + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( - params: Params$Resource$Projects$Agent$Intents$Create, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; create( - params: Params$Resource$Projects$Agent$Intents$Create, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; create( - callback: BodyResponseCallback + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; create( paramsOrCallback?: - | Params$Resource$Projects$Agent$Intents$Create - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Entitytypes$Create + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Intents$Create; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Intents$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; options = {}; } @@ -5562,7 +12253,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents').replace( + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( /([^:]\/)\/+/g, '$1' ), @@ -5576,46 +12267,46 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * dialogflow.projects.agent.intents.delete - * @desc Deletes the specified intent and its direct or indirect followup intents. - * @alias dialogflow.projects.agent.intents.delete + * dialogflow.projects.locations.agent.entityTypes.delete + * @desc Deletes the specified entity type. + * @alias dialogflow.projects.locations.agent.entityTypes.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. + * @param {string} params.name Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. * @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$Agent$Intents$Delete, + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Projects$Agent$Intents$Delete, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Projects$Agent$Intents$Delete, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Intents$Delete + | Params$Resource$Projects$Locations$Agent$Entitytypes$Delete | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -5623,12 +12314,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Intents$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Intents$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; options = {}; } @@ -5659,53 +12350,60 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.agent.intents.get - * @desc Retrieves the specified intent. - * @alias dialogflow.projects.agent.intents.get + * dialogflow.projects.locations.agent.entityTypes.get + * @desc Retrieves the specified entity type. + * @alias dialogflow.projects.locations.agent.entityTypes.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. - * @param {string=} params.languageCode Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * @param {string} params.name Required. The name of the intent. Format: `projects//agent/intents/`. + * @param {string=} params.languageCode Optional. The language to retrieve entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name Required. The name of the entity type. Format: `projects//agent/entityTypes/`. * @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$Agent$Intents$Get, + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Projects$Agent$Intents$Get, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; get( - params: Params$Resource$Projects$Agent$Intents$Get, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; get( - callback: BodyResponseCallback + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; get( paramsOrCallback?: - | Params$Resource$Projects$Agent$Intents$Get - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Entitytypes$Get + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Intents$Get; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Intents$Get; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; options = {}; } @@ -5729,83 +12427,84 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * dialogflow.projects.agent.intents.list - * @desc Returns the list of all intents in the specified agent. - * @alias dialogflow.projects.agent.intents.list + * dialogflow.projects.locations.agent.entityTypes.list + * @desc Returns the list of all entity types in the specified agent. + * @alias dialogflow.projects.locations.agent.entityTypes.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. - * @param {string=} params.languageCode Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string=} params.languageCode Optional. The language to list entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. * @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 agent to list all intents from. Format: `projects//agent`. + * @param {string} params.parent Required. The agent to list all entity types from. Format: `projects//agent`. * @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$Agent$Intents$List, + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse + >; list( - params: Params$Resource$Projects$Agent$Intents$List, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse > ): void; list( - params: Params$Resource$Projects$Agent$Intents$List, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse > ): void; list( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse > ): void; list( paramsOrCallback?: - | Params$Resource$Projects$Agent$Intents$List + | Params$Resource$Projects$Locations$Agent$Entitytypes$List | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse > ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Intents$List; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Intents$List; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$List; options = {}; } @@ -5818,7 +12517,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents').replace( + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( /([^:]\/)\/+/g, '$1' ), @@ -5833,65 +12532,72 @@ export namespace dialogflow_v2beta1 { }; if (callback) { createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse >(parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + Schema$GoogleCloudDialogflowV2beta1ListEntityTypesResponse >(parameters); } } /** - * dialogflow.projects.agent.intents.patch - * @desc Updates the specified intent. - * @alias dialogflow.projects.agent.intents.patch + * dialogflow.projects.locations.agent.entityTypes.patch + * @desc Updates the specified entity type. + * @alias dialogflow.projects.locations.agent.entityTypes.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. - * @param {string=} params.languageCode Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * @param {string} params.name The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + * @param {string=} params.languageCode Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. * @param {string=} params.updateMask Optional. The mask to control which fields get updated. - * @param {().GoogleCloudDialogflowV2beta1Intent} params.resource Request body data + * @param {().GoogleCloudDialogflowV2beta1EntityType} params.requestBody 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$Agent$Intents$Patch, + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; patch( - params: Params$Resource$Projects$Agent$Intents$Patch, + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; patch( - params: Params$Resource$Projects$Agent$Intents$Patch, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; patch( - callback: BodyResponseCallback + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > ): void; patch( paramsOrCallback?: - | Params$Resource$Projects$Agent$Intents$Patch - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Entitytypes$Patch + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1EntityType + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Intents$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Intents$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; options = {}; } @@ -5915,19 +12621,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } } - export interface Params$Resource$Projects$Agent$Intents$Batchdelete + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete extends StandardParameters { /** * Auth client or API Key for the request @@ -5942,9 +12648,9 @@ export namespace dialogflow_v2beta1 { /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest; + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest; } - export interface Params$Resource$Projects$Agent$Intents$Batchupdate + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate extends StandardParameters { /** * Auth client or API Key for the request @@ -5952,16 +12658,16 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the agent to update or create intents in. Format: `projects//agent`. + * Required. The name of the agent to update or create entity types in. Format: `projects//agent`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest; + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest; } - export interface Params$Resource$Projects$Agent$Intents$Create + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Create extends StandardParameters { /** * Auth client or API Key for the request @@ -5969,24 +12675,20 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; /** - * Required. The agent to create a intent for. Format: `projects//agent`. + * Required. The agent to create a entity type for. Format: `projects//agent`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; } - export interface Params$Resource$Projects$Agent$Intents$Delete + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Delete extends StandardParameters { /** * Auth client or API Key for the request @@ -5994,11 +12696,11 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. + * Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. */ name?: string; } - export interface Params$Resource$Projects$Agent$Intents$Get + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Get extends StandardParameters { /** * Auth client or API Key for the request @@ -6006,19 +12708,15 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language to retrieve entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; /** - * Required. The name of the intent. Format: `projects//agent/intents/`. + * Required. The name of the entity type. Format: `projects//agent/entityTypes/`. */ name?: string; } - export interface Params$Resource$Projects$Agent$Intents$List + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$List extends StandardParameters { /** * Auth client or API Key for the request @@ -6026,11 +12724,7 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language to list entity synonyms for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; /** @@ -6042,11 +12736,11 @@ export namespace dialogflow_v2beta1 { */ pageToken?: string; /** - * Required. The agent to list all intents from. Format: `projects//agent`. + * Required. The agent to list all entity types from. Format: `projects//agent`. */ parent?: string; } - export interface Params$Resource$Projects$Agent$Intents$Patch + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Patch extends StandardParameters { /** * Auth client or API Key for the request @@ -6054,15 +12748,11 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * Optional. The language of entity synonyms defined in `entity_type`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; /** - * The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. */ name?: string; /** @@ -6073,80 +12763,62 @@ export namespace dialogflow_v2beta1 { /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; } - export class Resource$Projects$Agent$Knowledgebases { + export class Resource$Projects$Locations$Agent$Entitytypes$Entities { context: APIRequestContext; - documents: Resource$Projects$Agent$Knowledgebases$Documents; constructor(context: APIRequestContext) { this.context = context; - this.documents = new Resource$Projects$Agent$Knowledgebases$Documents( - this.context - ); } /** - * dialogflow.projects.agent.knowledgeBases.create - * @desc Creates a knowledge base. - * @alias dialogflow.projects.agent.knowledgeBases.create + * dialogflow.projects.locations.agent.entityTypes.entities.batchCreate + * @desc Creates multiple new entities in the specified entity type. Operation + * @alias dialogflow.projects.locations.agent.entityTypes.entities.batchCreate * @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.parent Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. + * @param {().GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest} params.requestBody 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$Agent$Knowledgebases$Create, + batchCreate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Knowledgebases$Create, + ): GaxiosPromise; + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Agent$Knowledgebases$Create, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + batchCreate( + callback: BodyResponseCallback ): void; - create( + batchCreate( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Create - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Create; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; options = {}; } @@ -6159,7 +12831,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( + url: (rootUrl + '/v2beta1/{+parent}/entities:batchCreate').replace( /([^:]\/)\/+/g, '$1' ), @@ -6173,60 +12845,62 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.knowledgeBases.delete - * @desc Deletes the specified knowledge base. - * @alias dialogflow.projects.agent.knowledgeBases.delete + * dialogflow.projects.locations.agent.entityTypes.entities.batchDelete + * @desc Deletes entities in the specified entity type. Operation + * @alias dialogflow.projects.locations.agent.entityTypes.entities.batchDelete * @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.parent Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. + * @param {().GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest} params.requestBody 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$Agent$Knowledgebases$Delete, + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Knowledgebases$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Agent$Knowledgebases$Delete, - callback: BodyResponseCallback + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Delete - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; options = {}; } @@ -6239,183 +12913,244 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/entities:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.knowledgeBases.get - * @desc Retrieves the specified knowledge base. - * @alias dialogflow.projects.agent.knowledgeBases.get + * dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate + * @desc Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation + * @alias dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate * @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. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. + * @param {().GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest} params.requestBody 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$Agent$Knowledgebases$Get, + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Knowledgebases$Get, + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Agent$Knowledgebases$Get, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + batchUpdate( + callback: BodyResponseCallback ): void; - get( + batchUpdate( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Get - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Get; + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; let options = (optionsOrCallback || {}) as MethodOptions; - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Get; - options = {}; - } + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; + 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}/entities:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. + */ + parent?: string; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest; + } - 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.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback - ); - } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >(parameters); - } + export class Resource$Projects$Locations$Agent$Environments { + context: APIRequestContext; + users: Resource$Projects$Locations$Agent$Environments$Users; + constructor(context: APIRequestContext) { + this.context = context; + this.users = new Resource$Projects$Locations$Agent$Environments$Users( + this.context + ); + } + } + + export class Resource$Projects$Locations$Agent$Environments$Users { + context: APIRequestContext; + sessions: Resource$Projects$Locations$Agent$Environments$Users$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.sessions = new Resource$Projects$Locations$Agent$Environments$Users$Sessions( + this.context + ); + } + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts; + entityTypes: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes( + this.context + ); } /** - * dialogflow.projects.agent.knowledgeBases.list - * @desc Returns the list of all knowledge bases of the specified agent. - * @alias dialogflow.projects.agent.knowledgeBases.list + * dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts + * @desc Deletes all active contexts in the specified session. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts * @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 {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 */ - list( - params?: Params$Resource$Projects$Agent$Knowledgebases$List, + deleteContexts( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, options?: MethodOptions - ): GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >; - list( - params: Params$Resource$Projects$Agent$Knowledgebases$List, - options: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - > + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Knowledgebases$List, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - > + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - > + deleteContexts( + callback: BodyResponseCallback ): void; - list( + deleteContexts( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$List - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >, + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$List; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$List; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; options = {}; } @@ -6428,11 +13163,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'DELETE', }, options ), @@ -6442,78 +13177,75 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.knowledgeBases.patch - * @desc Updates the specified knowledge base. - * @alias dialogflow.projects.agent.knowledgeBases.patch + * dialogflow.projects.locations.agent.environments.users.sessions.detectIntent + * @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.detectIntent * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. - * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - * @param {().GoogleCloudDialogflowV2beta1KnowledgeBase} params.resource Request body data + * @param {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + * @param {().GoogleCloudDialogflowV2beta1DetectIntentRequest} params.requestBody 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$Agent$Knowledgebases$Patch, + detectIntent( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Knowledgebases$Patch, + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > ): void; - patch( - params: Params$Resource$Projects$Agent$Knowledgebases$Patch, + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > ): void; - patch( + detectIntent( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > ): void; - patch( + detectIntent( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Patch + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > - ): void | GaxiosPromise { + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; options = {}; } @@ -6526,75 +13258,32 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['session'], + pathParams: ['session'], context: this.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >(parameters); - } - } - } - - export interface Params$Resource$Projects$Agent$Knowledgebases$Create - extends StandardParameters { - /** - * 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$Agent$Knowledgebases$Delete - extends StandardParameters { - /** - * 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$Agent$Knowledgebases$Get - extends StandardParameters { - /** - * 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; + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters); + } + } } - export interface Params$Resource$Projects$Agent$Knowledgebases$List + + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts extends StandardParameters { /** * Auth client or API Key for the request @@ -6602,19 +13291,11 @@ export namespace dialogflow_v2beta1 { 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/`. + * 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 interface Params$Resource$Projects$Agent$Knowledgebases$Patch + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent extends StandardParameters { /** * Auth client or API Key for the request @@ -6622,73 +13303,71 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. - */ - name?: string; - /** - * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. */ - updateMask?: string; + session?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; + requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; } - export class Resource$Projects$Agent$Knowledgebases$Documents { + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * dialogflow.projects.agent.knowledgeBases.documents.create - * @desc Creates a new document. Operation - * @alias dialogflow.projects.agent.knowledgeBases.documents.create + * dialogflow.projects.locations.agent.environments.users.sessions.contexts.create + * @desc Creates a context. If the specified context already exists, overrides the context. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.contexts.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 {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.requestBody 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$Agent$Knowledgebases$Documents$Create, + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + callback: BodyResponseCallback ): void; create( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; create( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Documents$Create - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Create; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; options = {}; } @@ -6701,7 +13380,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents').replace( + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( /([^:]\/)\/+/g, '$1' ), @@ -6715,61 +13394,59 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * dialogflow.projects.agent.knowledgeBases.documents.delete - * @desc Deletes the specified document. Operation - * @alias dialogflow.projects.agent.knowledgeBases.documents.delete + * dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete + * @desc Deletes the specified context. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete * @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.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$Agent$Knowledgebases$Documents$Delete, + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; + ): GaxiosPromise; delete( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; delete( - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + callback: BodyResponseCallback ): void; + delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; options = {}; } @@ -6788,74 +13465,249 @@ export namespace dialogflow_v2beta1 { options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.locations.agent.environments.users.sessions.contexts.get + * @desc Retrieves the specified context. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.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$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.locations.agent.environments.users.sessions.contexts.list + * @desc Returns the list of all contexts in the specified session. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.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$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$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.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters); } } /** - * dialogflow.projects.agent.knowledgeBases.documents.get - * @desc Retrieves the specified document. - * @alias dialogflow.projects.agent.knowledgeBases.documents.get + * dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch + * @desc Updates the specified context. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch * @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 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Context} params.requestBody 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$Agent$Knowledgebases$Documents$Get, + patch( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document - > + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document - > + patch( + callback: BodyResponseCallback ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Documents$Get - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, + | BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document + Schema$GoogleCloudDialogflowV2beta1Context > - ): void | GaxiosPromise { + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Get; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Get; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; options = {}; } @@ -6869,7 +13721,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -6879,81 +13731,170 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create + extends StandardParameters { /** - * dialogflow.projects.agent.knowledgeBases.documents.list - * @desc Returns the list of all documents of the knowledge base. - * @alias dialogflow.projects.agent.knowledgeBases.documents.list + * 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$Locations$Agent$Environments$Users$Sessions$Contexts$Delete + extends StandardParameters { + /** + * 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$Locations$Agent$Environments$Users$Sessions$Contexts$Get + extends StandardParameters { + /** + * 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$Locations$Agent$Environments$Users$Sessions$Contexts$List + extends StandardParameters { + /** + * 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$Locations$Agent$Environments$Users$Sessions$Contexts$Patch + extends StandardParameters { + /** + * 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create + * @desc Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create * @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 {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2beta1SessionEntityType} params.requestBody 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$Agent$Knowledgebases$Documents$List, + create( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - list( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - list( + create( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - list( + create( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Documents$List + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$List; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$List; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; options = {}; } @@ -6966,11 +13907,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents').replace( + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -6980,64 +13921,59 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - >(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >(parameters); } } /** - * dialogflow.projects.agent.knowledgeBases.documents.patch - * @desc Updates the specified document. Operation - * @alias dialogflow.projects.agent.knowledgeBases.documents.patch + * dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete + * @desc Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. - * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - * @param {().GoogleCloudDialogflowV2beta1Document} params.resource Request body data + * @param {string} params.name Required. The name of the entity type to delete. 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 {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$Agent$Knowledgebases$Documents$Patch, + delete( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - patch( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, - callback: BodyResponseCallback + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback ): void; - patch( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; options = {}; } @@ -7051,7 +13987,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'DELETE', }, options ), @@ -7059,64 +13995,76 @@ export namespace dialogflow_v2beta1 { requiredParams: ['name'], pathParams: ['name'], context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback - ); + }; + if (callback) { + createAPIRequest(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.knowledgeBases.documents.reload - * @desc Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Operation - * @alias dialogflow.projects.agent.knowledgeBases.documents.reload + * dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get + * @desc Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The name of the document to reload. Format: `projects//knowledgeBases//documents/` - * @param {().GoogleCloudDialogflowV2beta1ReloadDocumentRequest} params.resource Request body data + * @param {string} params.name Required. The name of the 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 {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 */ - reload( - params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + get( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, options?: MethodOptions - ): GaxiosPromise; - reload( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > ): void; - reload( - params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > ): void; - reload( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > ): void; - reload( + get( paramsOrCallback?: - | Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; options = {}; } @@ -7129,11 +14077,8 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}:reload').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), @@ -7143,174 +14088,83 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); } } - } - - export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Create - extends StandardParameters { - /** - * 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$Agent$Knowledgebases$Documents$Delete - extends StandardParameters { - /** - * 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$Agent$Knowledgebases$Documents$Get - extends StandardParameters { - /** - * 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$Agent$Knowledgebases$Documents$List - extends StandardParameters { - /** - * 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 interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. - */ - name?: string; - /** - * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; - } - export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * The name of the document to reload. Format: `projects//knowledgeBases//documents/` - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest; - } - - export class Resource$Projects$Agent$Sessions { - context: APIRequestContext; - contexts: Resource$Projects$Agent$Sessions$Contexts; - entityTypes: Resource$Projects$Agent$Sessions$Entitytypes; - constructor(context: APIRequestContext) { - this.context = context; - this.contexts = new Resource$Projects$Agent$Sessions$Contexts( - this.context - ); - this.entityTypes = new Resource$Projects$Agent$Sessions$Entitytypes( - this.context - ); - } /** - * dialogflow.projects.agent.sessions.deleteContexts - * @desc Deletes all active contexts in the specified session. - * @alias dialogflow.projects.agent.sessions.deleteContexts + * dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list + * @desc Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list * @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 {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 session entity types 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$Agent$Sessions$Deletecontexts, + list( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, options?: MethodOptions - ): GaxiosPromise; - deleteContexts( - params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > ): void; - deleteContexts( - params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > ): void; - deleteContexts( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > ): void; - deleteContexts( + list( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Deletecontexts - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Deletecontexts; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Deletecontexts; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; options = {}; } @@ -7323,11 +14177,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( /([^:]\/)\/+/g, '$1' ), - method: 'DELETE', + method: 'GET', }, options ), @@ -7337,75 +14191,80 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters); } } /** - * dialogflow.projects.agent.sessions.detectIntent - * @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. - * @alias dialogflow.projects.agent.sessions.detectIntent + * dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch + * @desc Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It’s up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random numbers or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. - * @param {().GoogleCloudDialogflowV2beta1DetectIntentRequest} params.resource Request body data + * @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.requestBody 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 */ - detectIntent( - params?: Params$Resource$Projects$Agent$Sessions$Detectintent, + patch( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, options?: MethodOptions - ): GaxiosPromise; - detectIntent( - params: Params$Resource$Projects$Agent$Sessions$Detectintent, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - detectIntent( - params: Params$Resource$Projects$Agent$Sessions$Detectintent, + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - detectIntent( + patch( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - detectIntent( + patch( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Detectintent + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Detectintent; + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Detectintent; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; options = {}; } @@ -7418,32 +14277,30 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', }, options ), params, - requiredParams: ['session'], - pathParams: ['session'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse - >(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >(parameters); } } } - export interface Params$Resource$Projects$Agent$Sessions$Deletecontexts + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create extends StandardParameters { /** * Auth client or API Key for the request @@ -7451,11 +14308,16 @@ export namespace dialogflow_v2beta1 { 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. + * Required. The session to create a session entity type 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$GoogleCloudDialogflowV2beta1SessionEntityType; } - export interface Params$Resource$Projects$Agent$Sessions$Detectintent + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete extends StandardParameters { /** * Auth client or API Key for the request @@ -7463,71 +14325,117 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the session this query is sent to. 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 are using "-". It’s up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random numbers or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + * Required. The name of the entity type to delete. 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. */ - session?: string; + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List + extends StandardParameters { + /** + * 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 session entity types 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$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * 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. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; } - export class Resource$Projects$Agent$Sessions$Contexts { + export class Resource$Projects$Locations$Agent$Intents { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * dialogflow.projects.agent.sessions.contexts.create - * @desc Creates a context. If the specified context already exists, overrides the context. - * @alias dialogflow.projects.agent.sessions.contexts.create + * dialogflow.projects.locations.agent.intents.batchDelete + * @desc Deletes intents in the specified agent. Operation + * @alias dialogflow.projects.locations.agent.intents.batchDelete * @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.parent Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest} params.requestBody 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$Agent$Sessions$Contexts$Create, + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, - callback: BodyResponseCallback + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + batchDelete( + callback: BodyResponseCallback ): void; - create( + batchDelete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Create - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Intents$Batchdelete + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Context - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Create; + {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; options = {}; } @@ -7540,7 +14448,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/intents:batchDelete').replace( /([^:]\/)\/+/g, '$1' ), @@ -7554,59 +14462,62 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.sessions.contexts.delete - * @desc Deletes the specified context. - * @alias dialogflow.projects.agent.sessions.contexts.delete + * dialogflow.projects.locations.agent.intents.batchUpdate + * @desc Updates/Creates multiple intents in the specified agent. Operation + * @alias dialogflow.projects.locations.agent.intents.batchUpdate * @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 {string} params.parent Required. The name of the agent to update or create intents in. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest} params.requestBody 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$Agent$Sessions$Contexts$Delete, + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, - callback: BodyResponseCallback + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Delete - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Intents$Batchupdate + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; options = {}; } @@ -7619,71 +14530,78 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/intents:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.sessions.contexts.get - * @desc Retrieves the specified context. - * @alias dialogflow.projects.agent.sessions.contexts.get + * dialogflow.projects.locations.agent.intents.create + * @desc Creates an intent in the specified agent. + * @alias dialogflow.projects.locations.agent.intents.create * @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.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.parent Required. The agent to create a intent for. Format: `projects//agent`. + * @param {().GoogleCloudDialogflowV2beta1Intent} params.requestBody 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$Agent$Sessions$Contexts$Get, + create( + params?: Params$Resource$Projects$Locations$Agent$Intents$Create, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + callback: BodyResponseCallback ): void; - get( + create( + callback: BodyResponseCallback + ): void; + create( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Get - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Intents$Create + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Context - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Get; + {}) as Params$Resource$Projects$Locations$Agent$Intents$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Get; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Create; options = {}; } @@ -7696,92 +14614,73 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + url: (rootUrl + '/v2beta1/{+parent}/intents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * dialogflow.projects.agent.sessions.contexts.list - * @desc Returns the list of all contexts in the specified session. - * @alias dialogflow.projects.agent.sessions.contexts.list + * dialogflow.projects.locations.agent.intents.delete + * @desc Deletes the specified intent and its direct or indirect followup intents. + * @alias dialogflow.projects.locations.agent.intents.delete * @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.name Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. * @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$Agent$Sessions$Contexts$List, + delete( + params?: Params$Resource$Projects$Locations$Agent$Intents$Delete, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Agent$Sessions$Contexts$List, - options: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > - ): void; - list( - params: Params$Resource$Projects$Agent$Sessions$Contexts$List, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + callback: BodyResponseCallback ): void; - list( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$List - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >, + | Params$Resource$Projects$Locations$Agent$Intents$Delete + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$List; + {}) as Params$Resource$Projects$Locations$Agent$Intents$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$List; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Delete; options = {}; } @@ -7794,80 +14693,71 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListContextsResponse - >(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.sessions.contexts.patch - * @desc Updates the specified context. - * @alias dialogflow.projects.agent.sessions.contexts.patch + * dialogflow.projects.locations.agent.intents.get + * @desc Retrieves the specified intent. + * @alias dialogflow.projects.locations.agent.intents.get * @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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. 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.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name Required. The name of the intent. Format: `projects//agent/intents/`. * @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$Agent$Sessions$Contexts$Patch, + get( + params?: Params$Resource$Projects$Locations$Agent$Intents$Get, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - patch( + get( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Patch - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Intents$Get + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Context - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Intents$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Get; options = {}; } @@ -7881,7 +14771,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), @@ -7891,170 +14781,83 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } - } - - export interface Params$Resource$Projects$Agent$Sessions$Contexts$Create - extends StandardParameters { - /** - * 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$Agent$Sessions$Contexts$Delete - extends StandardParameters { - /** - * 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$Agent$Sessions$Contexts$Get - extends StandardParameters { - /** - * 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$Agent$Sessions$Contexts$List - extends StandardParameters { - /** - * 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$Agent$Sessions$Contexts$Patch - extends StandardParameters { - /** - * 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. 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$Agent$Sessions$Entitytypes { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * dialogflow.projects.agent.sessions.entityTypes.create - * @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 + * dialogflow.projects.locations.agent.intents.list + * @desc Returns the list of all intents in the specified agent. + * @alias dialogflow.projects.locations.agent.intents.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2beta1SessionEntityType} params.resource Request body data + * @param {string=} params.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @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 agent to list all intents from. Format: `projects//agent`. * @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$Agent$Sessions$Entitytypes$Create, + list( + params?: Params$Resource$Projects$Locations$Agent$Intents$List, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse > ): void; - create( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse > ): void; - create( + list( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse > ): void; - create( + list( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Create + | Params$Resource$Projects$Locations$Agent$Intents$List | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse > ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Create; + {}) as Params$Resource$Projects$Locations$Agent$Intents$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$List; options = {}; } @@ -8067,11 +14870,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/intents').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -8081,59 +14884,66 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse + >(parameters, callback); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1ListIntentsResponse >(parameters); } } /** - * dialogflow.projects.agent.sessions.entityTypes.delete - * @desc Deletes the specified session entity type. - * @alias dialogflow.projects.agent.sessions.entityTypes.delete + * dialogflow.projects.locations.agent.intents.patch + * @desc Updates the specified intent. + * @alias dialogflow.projects.locations.agent.intents.patch * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the entity type to delete. 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.intentView Optional. The resource view to apply to the returned intent. + * @param {string=} params.languageCode Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * @param {string} params.name The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Intent} params.requestBody 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$Agent$Sessions$Entitytypes$Delete, + patch( + params?: Params$Resource$Projects$Locations$Agent$Intents$Patch, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + patch( + callback: BodyResponseCallback + ): void; + patch( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Intents$Patch + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Intents$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Patch; options = {}; } @@ -8147,7 +14957,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'PATCH', }, options ), @@ -8157,174 +14967,225 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Batchdelete + extends StandardParameters { /** - * dialogflow.projects.agent.sessions.entityTypes.get - * @desc Retrieves the specified session entity type. - * @alias dialogflow.projects.agent.sessions.entityTypes.get - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string} params.name Required. The name of the 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 {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 + * Auth client or API Key for the request */ - get( - params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, - options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, - options: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > - ): void; - get( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > - ): void; - get( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > - ): void; - get( - paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Get - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - > { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Get; - let options = (optionsOrCallback || {}) as MethodOptions; + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Batchupdate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the agent to update or create intents in. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The agent to create a intent for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language to retrieve training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The name of the intent. Format: `projects//agent/intents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language to list training phrases, parameters and rich messages for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * 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 agent to list all intents from. Format: `projects//agent`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Get; - options = {}; - } + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language of training phrases, parameters and rich messages defined in `intent`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + } - 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.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback - ); - } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >(parameters); - } + export class Resource$Projects$Locations$Agent$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Locations$Agent$Sessions$Contexts; + entityTypes: Resource$Projects$Locations$Agent$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Locations$Agent$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Locations$Agent$Sessions$Entitytypes( + this.context + ); } /** - * dialogflow.projects.agent.sessions.entityTypes.list - * @desc Returns the list of all session entity types in the specified session. - * @alias dialogflow.projects.agent.sessions.entityTypes.list + * dialogflow.projects.locations.agent.sessions.deleteContexts + * @desc Deletes all active contexts in the specified session. + * @alias dialogflow.projects.locations.agent.sessions.deleteContexts * @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 session entity types 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 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 */ - list( - params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + deleteContexts( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, options?: MethodOptions - ): GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >; - list( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, - options: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > + deleteContexts( + callback: BodyResponseCallback ): void; - list( + deleteContexts( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$List - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >, + | Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$List; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$List; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; options = {}; } @@ -8337,11 +15198,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'DELETE', }, options ), @@ -8351,80 +15212,75 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse - >(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.agent.sessions.entityTypes.patch - * @desc Updates the specified session entity type. - * @alias dialogflow.projects.agent.sessions.entityTypes.patch + * dialogflow.projects.locations.agent.sessions.detectIntent + * @desc Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. + * @alias dialogflow.projects.locations.agent.sessions.detectIntent * @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. `` 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 {string} params.session Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. + * @param {().GoogleCloudDialogflowV2beta1DetectIntentRequest} params.requestBody 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$Agent$Sessions$Entitytypes$Patch, + detectIntent( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > ): void; - patch( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > ): void; - patch( + detectIntent( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > ): void; - patch( + detectIntent( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch + | Params$Resource$Projects$Locations$Agent$Sessions$Detectintent | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; options = {}; } @@ -8437,71 +15293,32 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['session'], + pathParams: ['session'], context: this.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); - } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1SessionEntityType - >(parameters); - } - } - } - - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Create - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The session to create a session entity type 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$GoogleCloudDialogflowV2beta1SessionEntityType; - } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The name of the entity type to delete. 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. - */ - name?: string; - } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Get - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Required. The name of the 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. - */ - name?: string; + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse + >(parameters); + } + } } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$List + + export interface Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts extends StandardParameters { /** * Auth client or API Key for the request @@ -8509,19 +15326,11 @@ export namespace dialogflow_v2beta1 { 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 session entity types 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 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 interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch + export interface Params$Resource$Projects$Locations$Agent$Sessions$Detectintent extends StandardParameters { /** * Auth client or API Key for the request @@ -8529,91 +15338,71 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * 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. - */ - name?: string; - /** - * Optional. The mask to control which fields get updated. + * Required. The name of the session this query is sent to. 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 are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. */ - updateMask?: string; + session?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; } - export class Resource$Projects$Knowledgebases { + export class Resource$Projects$Locations$Agent$Sessions$Contexts { context: APIRequestContext; - documents: Resource$Projects$Knowledgebases$Documents; constructor(context: APIRequestContext) { this.context = context; - this.documents = new Resource$Projects$Knowledgebases$Documents( - this.context - ); } /** - * dialogflow.projects.knowledgeBases.create - * @desc Creates a knowledge base. - * @alias dialogflow.projects.knowledgeBases.create + * dialogflow.projects.locations.agent.sessions.contexts.create + * @desc Creates a context. If the specified context already exists, overrides the context. + * @alias dialogflow.projects.locations.agent.sessions.contexts.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 {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.requestBody 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, + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( - params: Params$Resource$Projects$Knowledgebases$Create, + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Knowledgebases$Create, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + callback: BodyResponseCallback ): void; create( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + callback: BodyResponseCallback ): void; create( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Create - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, + | BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1Context > - ): void | GaxiosPromise { + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Create; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; options = {}; } @@ -8626,7 +15415,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( /([^:]\/)\/+/g, '$1' ), @@ -8640,47 +15429,46 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >(parameters); + return createAPIRequest( + parameters + ); } } /** - * dialogflow.projects.knowledgeBases.delete - * @desc Deletes the specified knowledge base. - * @alias dialogflow.projects.knowledgeBases.delete + * dialogflow.projects.locations.agent.sessions.contexts.delete + * @desc Deletes the specified context. + * @alias dialogflow.projects.locations.agent.sessions.contexts.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 {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$Knowledgebases$Delete, + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Projects$Knowledgebases$Delete, + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Projects$Knowledgebases$Delete, + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Delete + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -8688,12 +15476,187 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * dialogflow.projects.locations.agent.sessions.contexts.get + * @desc Retrieves the specified context. + * @alias dialogflow.projects.locations.agent.sessions.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$Locations$Agent$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1Context + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$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.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * dialogflow.projects.locations.agent.sessions.contexts.list + * @desc Returns the list of all contexts in the specified session. + * @alias dialogflow.projects.locations.agent.sessions.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$Locations$Agent$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; options = {}; } @@ -8706,83 +15669,80 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListContextsResponse + >(parameters); } } /** - * dialogflow.projects.knowledgeBases.get - * @desc Retrieves the specified knowledge base. - * @alias dialogflow.projects.knowledgeBases.get + * dialogflow.projects.locations.agent.sessions.contexts.patch + * @desc Updates the specified context. + * @alias dialogflow.projects.locations.agent.sessions.contexts.patch * @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.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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * @param {string=} params.updateMask Optional. The mask to control which fields get updated. + * @param {().GoogleCloudDialogflowV2beta1Context} params.requestBody 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, + patch( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Knowledgebases$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Knowledgebases$Get, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + patch( + callback: BodyResponseCallback ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Get - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, + | BodyResponseCallback, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase + Schema$GoogleCloudDialogflowV2beta1Context > - ): void | GaxiosPromise { + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Get; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Get; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; options = {}; } @@ -8796,7 +15756,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -8806,83 +15766,170 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create + extends StandardParameters { /** - * dialogflow.projects.knowledgeBases.list - * @desc Returns the list of all knowledge bases of the specified agent. - * @alias dialogflow.projects.knowledgeBases.list + * 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$Locations$Agent$Sessions$Contexts$Delete + extends StandardParameters { + /** + * 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$Locations$Agent$Sessions$Contexts$Get + extends StandardParameters { + /** + * 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$Locations$Agent$Sessions$Contexts$List + extends StandardParameters { + /** + * 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$Locations$Agent$Sessions$Contexts$Patch + extends StandardParameters { + /** + * 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, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + + export class Resource$Projects$Locations$Agent$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.locations.agent.sessions.entityTypes.create + * @desc Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.sessions.entityTypes.create * @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 {string} params.parent Required. The session to create a session entity type 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 {().GoogleCloudDialogflowV2beta1SessionEntityType} params.requestBody 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$Knowledgebases$List, + create( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, options?: MethodOptions - ): GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >; - list( - params: Params$Resource$Projects$Knowledgebases$List, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, options: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - list( - params: Params$Resource$Projects$Knowledgebases$List, + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - list( + create( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - list( + create( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$List + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, optionsOrCallback?: | MethodOptions | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$List; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$List; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; options = {}; } @@ -8895,11 +15942,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -8909,78 +15956,59 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse - >(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse + Schema$GoogleCloudDialogflowV2beta1SessionEntityType >(parameters); } } /** - * dialogflow.projects.knowledgeBases.patch - * @desc Updates the specified knowledge base. - * @alias dialogflow.projects.knowledgeBases.patch + * dialogflow.projects.locations.agent.sessions.entityTypes.delete + * @desc Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.sessions.entityTypes.delete * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. - * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - * @param {().GoogleCloudDialogflowV2beta1KnowledgeBase} params.resource Request body data + * @param {string} params.name Required. The name of the entity type to delete. 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 {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$Knowledgebases$Patch, + delete( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Knowledgebases$Patch, - options: - | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > - ): void; - patch( - params: Params$Resource$Projects$Knowledgebases$Patch, - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback ): void; - patch( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Patch - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - > - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; options = {}; } @@ -8994,7 +16022,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'DELETE', }, options ), @@ -9004,158 +16032,74 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); + createAPIRequest(parameters, callback); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1KnowledgeBase - >(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Knowledgebases$Create - extends StandardParameters { - /** - * 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 - extends StandardParameters { - /** - * 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 - extends StandardParameters { - /** - * 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 - extends StandardParameters { - /** - * 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 interface Params$Resource$Projects$Knowledgebases$Patch - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//knowledgeBases/`. - */ - name?: string; - /** - * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; - } - - export class Resource$Projects$Knowledgebases$Documents { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * dialogflow.projects.knowledgeBases.documents.create - * @desc Creates a new document. Operation - * @alias dialogflow.projects.knowledgeBases.documents.create + * dialogflow.projects.locations.agent.sessions.entityTypes.get + * @desc Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.sessions.entityTypes.get * @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 {string} params.name Required. The name of the 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 {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, + get( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > ): void; - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > ): void; - create( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > ): void; - create( + get( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Create - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Create; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; options = {}; } @@ -9168,75 +16112,94 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); } } /** - * dialogflow.projects.knowledgeBases.documents.delete - * @desc Deletes the specified document. Operation - * @alias dialogflow.projects.knowledgeBases.documents.delete + * dialogflow.projects.locations.agent.sessions.entityTypes.list + * @desc Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.sessions.entityTypes.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The name of the document to delete. Format: `projects//knowledgeBases//documents/`. + * @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 session entity types 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 */ - delete( - params?: Params$Resource$Projects$Knowledgebases$Documents$Delete, + list( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + ): GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > ): void; - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > ): void; - delete( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > ): void; - delete( + list( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Delete - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; options = {}; } @@ -9249,80 +16212,94 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( - parameters, - callback - ); + createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters, callback); } else { - return createAPIRequest(parameters); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse + >(parameters); } } /** - * dialogflow.projects.knowledgeBases.documents.get - * @desc Retrieves the specified document. - * @alias dialogflow.projects.knowledgeBases.documents.get + * dialogflow.projects.locations.agent.sessions.entityTypes.patch + * @desc Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @alias dialogflow.projects.locations.agent.sessions.entityTypes.patch * @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 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.requestBody 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$Documents$Get, + patch( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Knowledgebases$Documents$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, options: | MethodOptions - | BodyResponseCallback, + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - get( - params: Params$Resource$Projects$Knowledgebases$Documents$Get, + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - get( + patch( callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Get - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, + | BodyResponseCallback< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >, callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1Document + Schema$GoogleCloudDialogflowV2beta1SessionEntityType > - ): void | GaxiosPromise { + ): void | GaxiosPromise< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + > { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Get; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Get; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; options = {}; } @@ -9336,7 +16313,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -9346,81 +16323,149 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest< + Schema$GoogleCloudDialogflowV2beta1SessionEntityType + >(parameters); } } + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create + extends StandardParameters { /** - * dialogflow.projects.knowledgeBases.documents.list - * @desc Returns the list of all documents of the knowledge base. - * @alias dialogflow.projects.knowledgeBases.documents.list + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The session to create a session entity type 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$GoogleCloudDialogflowV2beta1SessionEntityType; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the entity type to delete. 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the 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. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List + extends StandardParameters { + /** + * 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 session entity types 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$Locations$Agent$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * 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. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * dialogflow.projects.locations.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * @alias dialogflow.projects.locations.operations.cancel * @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 {string} params.name The name of the operation resource to be cancelled. * @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, + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions - ): GaxiosPromise; - 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 - > + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - > + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback ): void; - list( + cancel(callback: BodyResponseCallback): void; + cancel( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$List - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - >, + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - >, - callback?: BodyResponseCallback< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - > - ): void | GaxiosPromise< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - > { + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$List; + {}) as Params$Resource$Projects$Locations$Operations$Cancel; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$List; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; options = {}; } @@ -9433,65 +16478,59 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents').replace( + url: (rootUrl + '/v2beta1/{+name}:cancel').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - >(parameters, callback); + createAPIRequest(parameters, callback); } else { - return createAPIRequest< - Schema$GoogleCloudDialogflowV2beta1ListDocumentsResponse - >(parameters); + return createAPIRequest(parameters); } } /** - * dialogflow.projects.knowledgeBases.documents.patch - * @desc Updates the specified document. Operation - * @alias dialogflow.projects.knowledgeBases.documents.patch + * dialogflow.projects.locations.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.locations.operations.get * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. - * @param {string=} params.updateMask Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - * @param {().GoogleCloudDialogflowV2beta1Document} params.resource Request body data + * @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 */ - patch( - params?: Params$Resource$Projects$Knowledgebases$Documents$Patch, + get( + params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + get( + params: Params$Resource$Projects$Locations$Operations$Get, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + get( + params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback ): void; - patch( + get( callback: BodyResponseCallback ): void; - patch( + get( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Patch + | Params$Resource$Projects$Locations$Operations$Get | BodyResponseCallback, optionsOrCallback?: | MethodOptions @@ -9499,12 +16538,12 @@ export namespace dialogflow_v2beta1 { callback?: BodyResponseCallback ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Patch; + {}) as Params$Resource$Projects$Locations$Operations$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Patch; + params = {} as Params$Resource$Projects$Locations$Operations$Get; options = {}; } @@ -9518,7 +16557,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), @@ -9538,52 +16577,62 @@ export namespace dialogflow_v2beta1 { } /** - * dialogflow.projects.knowledgeBases.documents.reload - * @desc Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Operation - * @alias dialogflow.projects.knowledgeBases.documents.reload + * dialogflow.projects.locations.operations.list + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @alias dialogflow.projects.locations.operations.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.name The name of the document to reload. Format: `projects//knowledgeBases//documents/` - * @param {().GoogleCloudDialogflowV2beta1ReloadDocumentRequest} params.resource Request body data + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. * @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 - */ - reload( - params?: Params$Resource$Projects$Knowledgebases$Documents$Reload, + */ + list( + params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions - ): GaxiosPromise; - reload( - params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > ): void; - reload( - params: Params$Resource$Projects$Knowledgebases$Documents$Reload, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > ): void; - reload( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > ): void; - reload( + list( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Reload - | BodyResponseCallback, + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback, optionsOrCallback?: | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Reload; + {}) as Params$Resource$Projects$Locations$Operations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Reload; + params = {} as Params$Resource$Projects$Locations$Operations$List; options = {}; } @@ -9596,11 +16645,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}:reload').replace( + url: (rootUrl + '/v2beta1/{+name}/operations').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -9610,17 +16659,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } } - export interface Params$Resource$Projects$Knowledgebases$Documents$Create + export interface Params$Resource$Projects$Locations$Operations$Cancel extends StandardParameters { /** * Auth client or API Key for the request @@ -9628,16 +16679,11 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The knoweldge base to create a document for. Format: `projects//knowledgeBases/`. - */ - parent?: string; - - /** - * Request body metadata + * The name of the operation resource to be cancelled. */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; + name?: string; } - export interface Params$Resource$Projects$Knowledgebases$Documents$Delete + export interface Params$Resource$Projects$Locations$Operations$Get extends StandardParameters { /** * Auth client or API Key for the request @@ -9645,11 +16691,11 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The name of the document to delete. Format: `projects//knowledgeBases//documents/`. + * The name of the operation resource. */ name?: string; } - export interface Params$Resource$Projects$Knowledgebases$Documents$Get + export interface Params$Resource$Projects$Locations$Operations$List extends StandardParameters { /** * Auth client or API Key for the request @@ -9657,73 +16703,101 @@ export namespace dialogflow_v2beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * Required. The name of the document to retrieve. Format `projects//knowledgeBases//documents/`. + * The standard list filter. */ - name?: string; - } - export interface Params$Resource$Projects$Knowledgebases$Documents$List - extends StandardParameters { + filter?: string; /** - * Auth client or API Key for the request + * The name of the operation's parent resource. */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - + name?: string; /** - * Optional. The maximum number of items to return in a single page. By default 10 and at most 100. + * The standard list page size. */ pageSize?: number; /** - * Optional. The next_page_token value returned from a previous list request. + * The standard list page token. */ pageToken?: string; - /** - * Required. The knowledge base to list all documents for. Format: `projects//knowledgeBases/`. - */ - parent?: string; } - export interface Params$Resource$Projects$Knowledgebases$Documents$Patch - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - /** - * The document resource name. The name must be empty when creating a document. Format: `projects//knowledgeBases//documents/`. - */ - name?: string; - /** - * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - */ - updateMask?: string; + export class Resource$Projects$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; - } - export interface Params$Resource$Projects$Knowledgebases$Documents$Reload - extends StandardParameters { - /** - * Auth client or API Key for the request + * dialogflow.projects.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * @alias dialogflow.projects.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @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 */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + cancel( + params?: Params$Resource$Projects$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Operations$Cancel + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; - /** - * The name of the document to reload. Format: `projects//knowledgeBases//documents/` - */ - name?: string; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Cancel; + options = {}; + } - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest; - } + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } - export class Resource$Projects$Operations { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; + 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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } } /** @@ -9803,8 +16877,114 @@ export namespace dialogflow_v2beta1 { return createAPIRequest(parameters); } } + + /** + * dialogflow.projects.operations.list + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @alias dialogflow.projects.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > + ): void; + list( + params: Params$Resource$Projects$Operations$List, + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Operations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleLongrunningListOperationsResponse + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$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/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } } + export interface Params$Resource$Projects$Operations$Cancel + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + } export interface Params$Resource$Projects$Operations$Get extends StandardParameters { /** @@ -9817,4 +16997,28 @@ export namespace dialogflow_v2beta1 { */ name?: string; } + export interface Params$Resource$Projects$Operations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } } diff --git a/src/apis/displayvideo/README.md b/src/apis/displayvideo/README.md new file mode 100644 index 0000000000..94abc3ba9d --- /dev/null +++ b/src/apis/displayvideo/README.md @@ -0,0 +1,47 @@ +Google Inc. logo + +# displayvideo + +> Display & Video 360 API allows users to manage and create campaigns and reports. + +## Installation + +```sh +$ npm install googleapis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). + +## Building a browser bundle + +This library can be used in a browser. To prepare a single file bundle, clone the +[repository](https://github.com/googleapis/google-api-nodejs-client) and run + +```sh +$ cd src/apis/displayvideo +$ npm install +$ npm run webpack +``` + +The generated bundle will be written to `dist/displayvideo.min.js`. Use it from your HTML file: + +```html + + +``` + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE). + +## 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/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/displayvideo/index.ts b/src/apis/displayvideo/index.ts new file mode 100644 index 0000000000..2974d65cc5 --- /dev/null +++ b/src/apis/displayvideo/index.ts @@ -0,0 +1,35 @@ +// Copyright 2019 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 {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {displayvideo_v1} from './v1'; + +export const VERSIONS = { + v1: displayvideo_v1.Displayvideo, +}; + +export function displayvideo(version: 'v1'): displayvideo_v1.Displayvideo; +export function displayvideo( + options: displayvideo_v1.Options +): displayvideo_v1.Displayvideo; +export function displayvideo( + this: GoogleConfigurable, + versionOrOptions: 'v1' | displayvideo_v1.Options +) { + return getAPI('displayvideo', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; diff --git a/src/apis/displayvideo/package.json b/src/apis/displayvideo/package.json new file mode 100644 index 0000000000..7edb731966 --- /dev/null +++ b/src/apis/displayvideo/package.json @@ -0,0 +1,43 @@ +{ + "name": "@google/displayvideo", + "version": "0.1.0", + "description": "displayvideo", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^3.0.0" + }, + "devDependencies": { + "gts": "^1.0.0", + "null-loader": "^3.0.0", + "ts-loader": "^6.0.4", + "typedoc": "^0.16.0", + "typescript": "~3.7.0", + "webpack": "^4.35.3", + "webpack-cli": "^3.3.5" + } +} diff --git a/src/apis/displayvideo/tsconfig.json b/src/apis/displayvideo/tsconfig.json new file mode 100644 index 0000000000..e081090496 --- /dev/null +++ b/src/apis/displayvideo/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/displayvideo/v1.ts b/src/apis/displayvideo/v1.ts new file mode 100644 index 0000000000..fa749f1cc2 --- /dev/null +++ b/src/apis/displayvideo/v1.ts @@ -0,0 +1,564 @@ +// Copyright 2019 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. + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, +} from 'google-auth-library'; +import { + GoogleConfigurable, + createAPIRequest, + MethodOptions, + GlobalOptions, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {GaxiosPromise} from 'gaxios'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace displayvideo_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + interface StandardParameters { + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Display & Video 360 API + * + * Display & Video 360 API allows users to manage and create campaigns and reports. + * + * @example + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * @namespace displayvideo + * @type {Function} + * @version v1 + * @variation v1 + * @param {object=} options Options for Displayvideo + */ + export class Displayvideo { + context: APIRequestContext; + media: Resource$Media; + sdfdownloadtasks: Resource$Sdfdownloadtasks; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.media = new Resource$Media(this.context); + this.sdfdownloadtasks = new Resource$Sdfdownloadtasks(this.context); + } + } + + /** + * Request message for [SdfDownloadTaskService.CreateSdfDownloadTask]. + */ + export interface Schema$CreateSdfDownloadTaskRequest { + /** + * The ID of the advertiser to download SDF for. + */ + advertiserId?: string | null; + /** + * Filters on entities by their entity IDs. + */ + idFilter?: Schema$IdFilter; + /** + * Filters on Inventory Sources by their IDs. + */ + inventorySourceFilter?: Schema$InventorySourceFilter; + /** + * Filters on selected file types. The entities in each file are filtered by a chosen set of filter entities. The filter entities must be the same type as, or a parent type of, the selected file types. + */ + parentEntityFilter?: Schema$ParentEntityFilter; + /** + * The ID of the partner to download SDF for. + */ + partnerId?: string | null; + /** + * Required. The SDF version of the downloaded file. If set to `SDF_VERSION_UNSPECIFIED`, this will default to the version specified by the advertiser or partner identified by `root_id`. An advertiser inherits its SDF version from its partner unless configured otherwise. + */ + version?: string | null; + } + /** + * Media resource. + */ + export interface Schema$GoogleBytestreamMedia { + /** + * Name of the media resource. + */ + resourceName?: string | null; + } + /** + * A filtering option that filters entities by their entity IDs. + */ + export interface Schema$IdFilter { + /** + * TrueView Ads to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. + */ + adGroupAdIds?: string[] | null; + /** + * TrueView Ad Groups to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. + */ + adGroupIds?: string[] | null; + /** + * Campaigns to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. + */ + campaignIds?: string[] | null; + /** + * Insertion Orders to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. + */ + insertionOrderIds?: string[] | null; + /** + * Line Items to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. + */ + lineItemIds?: string[] | null; + /** + * Media Products to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. + */ + mediaProductIds?: string[] | null; + } + /** + * A filtering option for filtering on Inventory Source entities. + */ + export interface Schema$InventorySourceFilter { + /** + * Inventory Sources to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Leave empty to download all Inventory Sources for the selected Advertiser or Partner. + */ + inventorySourceIds?: string[] | null; + } + /** + * 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 | null; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 be a resource name ending with `operations/{unique_id}`. + */ + name?: string | null; + /** + * 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?: {[key: string]: any} | null; + } + /** + * A filtering option that filters on selected file types belonging to a chosen set of filter entities. + */ + export interface Schema$ParentEntityFilter { + /** + * Required. File types that will be returned. + */ + fileType?: string[] | null; + /** + * The IDs of the specified filter type. This is used to filter entities to fetch. If filter type is not `FILTER_TYPE_NONE`, at least one ID must be specified. + */ + filterIds?: string[] | null; + /** + * Required. Filter type used to filter fetched entities. + */ + filterType?: string | null; + } + /** + * Type for the response returned by [SdfDownloadTaskService.CreateSdfDownloadTask]. + */ + export interface Schema$SdfDownloadTask { + /** + * A resource name to be used in media.download to Download the prepared files. Resource names have the format `download/sdfdownloadtasks/media/{media_id}`. `media_id` will be made available by the long running operation service once the task status is done. + */ + resourceName?: string | null; + } + /** + * Type for the metadata returned by [SdfDownloadTaskService.CreateSdfDownloadTask]. + */ + export interface Schema$SdfDownloadTaskMetadata { + /** + * The time when the operation was created. + */ + createTime?: string | null; + /** + * The time when execution was completed. + */ + endTime?: string | null; + /** + * The SDF version used to execute this download task. + */ + version?: string | null; + } + /** + * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + + export class Resource$Media { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * displayvideo.media.download + * @desc Downloads media. Download is supported on the URI `/download/{resource_name=**}?alt=media.` **Note**: Download requests will not be successful without including `alt=media` query string. + * @alias displayvideo.media.download + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resourceName Name of the media that is being downloaded. See ReadRequest.resource_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 + */ + download( + params?: Params$Resource$Media$Download, + options?: MethodOptions + ): GaxiosPromise; + download( + params: Params$Resource$Media$Download, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + download( + params: Params$Resource$Media$Download, + callback: BodyResponseCallback + ): void; + download( + callback: BodyResponseCallback + ): void; + download( + paramsOrCallback?: + | Params$Resource$Media$Download + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Media$Download; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Media$Download; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/download/{+resourceName}').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resourceName'], + pathParams: ['resourceName'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Media$Download extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Name of the media that is being downloaded. See ReadRequest.resource_name. + */ + resourceName?: string; + } + + export class Resource$Sdfdownloadtasks { + context: APIRequestContext; + operations: Resource$Sdfdownloadtasks$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.operations = new Resource$Sdfdownloadtasks$Operations(this.context); + } + + /** + * displayvideo.sdfdownloadtasks.create + * @desc Creates an SDF Download Task. Returns an Operation. An SDF Download Task is a long-running, asynchronous operation. The metadata type of this operation is SdfDownloadTaskMetadata. If the request is successful, the response type of the operation is SdfDownloadTask. The response will not include the download files, which must be retrieved with media.download. The state of operation can be retrieved with sdfdownloadtask.operations.get. Any errors can be found in the error.message. Note that error.details is expected to be empty. + * @alias displayvideo.sdfdownloadtasks.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {().CreateSdfDownloadTaskRequest} params.requestBody 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$Sdfdownloadtasks$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Sdfdownloadtasks$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Sdfdownloadtasks$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Sdfdownloadtasks$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sdfdownloadtasks$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sdfdownloadtasks$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/sdfdownloadtasks').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sdfdownloadtasks$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Request body metadata + */ + requestBody?: Schema$CreateSdfDownloadTaskRequest; + } + + export class Resource$Sdfdownloadtasks$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * displayvideo.sdfdownloadtasks.operations.get + * @desc Gets the latest state of an asynchronous SDF download task operation. Clients should poll this method at intervals of 30 seconds. + * @alias displayvideo.sdfdownloadtasks.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$Sdfdownloadtasks$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Sdfdownloadtasks$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Sdfdownloadtasks$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Sdfdownloadtasks$Operations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sdfdownloadtasks$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sdfdownloadtasks$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sdfdownloadtasks$Operations$Get + extends StandardParameters { + /** + * 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/displayvideo/webpack.config.js b/src/apis/displayvideo/webpack.config.js new file mode 100644 index 0000000000..c3b1ce56f4 --- /dev/null +++ b/src/apis/displayvideo/webpack.config.js @@ -0,0 +1,69 @@ +// Copyright 2019 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. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + }, + output: { + library: 'Displayvideo', + filename: 'displayvideo.min.js', + path: path.resolve(__dirname, 'dist'), + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +}; diff --git a/src/apis/dlp/v2.ts b/src/apis/dlp/v2.ts index 0905ed003c..43dbbf3360 100644 --- a/src/apis/dlp/v2.ts +++ b/src/apis/dlp/v2.ts @@ -522,6 +522,39 @@ export namespace dlp_v2 { */ conditions?: Schema$GooglePrivacyDlpV2Condition[]; } + /** + * Represents a container that may contain DLP findings. Examples of a container include a file, table, or database record. + */ + export interface Schema$GooglePrivacyDlpV2Container { + /** + * A string representation of the full container name. Examples: - BigQuery: 'Project:DataSetId.TableId' - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + */ + fullPath?: string | null; + /** + * Project where the finding was found. Can be different from the project that owns the finding. + */ + projectId?: string | null; + /** + * The rest of the path after the root. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id` - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt` + */ + relativePath?: string | null; + /** + * The root of the container. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the root is `dataset_id` - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket` + */ + rootPath?: string | null; + /** + * Container type, for example BigQuery or Google Cloud Storage. + */ + type?: string | null; + /** + * Findings container modification timestamp, if applicable. For Google Cloud Storage contains last file modification timestamp. For BigQuery table contains last_modified_time property. For Datastore - not populated. + */ + updateTime?: string | null; + /** + * Findings container version, if available ("generation" for Google Cloud Storage). + */ + version?: string | null; + } /** * Container structure for the content to inspect. */ @@ -1178,6 +1211,18 @@ export namespace dlp_v2 { * The type of content that might have been found. Provided if `excluded_types` is false. */ infoType?: Schema$GooglePrivacyDlpV2InfoType; + /** + * Time the job started that produced this finding. + */ + jobCreateTime?: string | null; + /** + * The job that stored the finding. + */ + jobName?: string | null; + /** + * The labels associated with this `Finding`. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 10 labels can be associated with a given finding. Example: <code>"environment" : "production"</code> Example: <code>"pipeline" : "etl"</code> + */ + labels?: {[key: string]: string} | null; /** * Confidence of how likely it is that the `info_type` is correct. */ @@ -1186,6 +1231,10 @@ export namespace dlp_v2 { * Where the content was found. */ location?: Schema$GooglePrivacyDlpV2Location; + /** + * Resource name in format projects/{project}/locations/{location}/findings/{finding} Populated only when viewing persisted findings. + */ + name?: string | null; /** * The content that was found. Even if the content is not textual, it may be converted to a textual representation here. Provided if `include_quote` is true and the finding is less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes in length, the quote may be omitted. */ @@ -1194,6 +1243,14 @@ export namespace dlp_v2 { * Contains data parsed from quotes. Only populated if include_quote was set to true and a supported infoType was requested. Currently supported infoTypes: DATE, DATE_OF_BIRTH and TIME. */ quoteInfo?: Schema$GooglePrivacyDlpV2QuoteInfo; + /** + * The job that stored the finding. + */ + resourceName?: string | null; + /** + * Job trigger name, if applicable, for this finding. + */ + triggerName?: string | null; } /** * Configuration to control the number of findings returned. @@ -1204,7 +1261,7 @@ export namespace dlp_v2 { */ maxFindingsPerInfoType?: Schema$GooglePrivacyDlpV2InfoTypeLimit[]; /** - * Max number of findings that will be returned for each item scanned. When set within `InspectDataSourceRequest`, the maximum returned is 2000 regardless if this is set higher. When set within `InspectContentRequest`, this field is ignored. + * Max number of findings that will be returned for each item scanned. When set within `InspectJobConfig`, the maximum returned is 2000 regardless if this is set higher. When set within `InspectContentRequest`, this field is ignored. */ maxFindingsPerItem?: number | null; /** @@ -1212,6 +1269,10 @@ export namespace dlp_v2 { */ maxFindingsPerRequest?: number | null; } + /** + * The request message for finishing a DLP hybrid job. + */ + export interface Schema$GooglePrivacyDlpV2FinishDlpJobRequest {} /** * Buckets values based on fixed size ranges. The Bucketing transformation can provide all of this functionality, but requires more configuration. This message is provided as a convenience to the user for simple bucketing strategies. The transformed value will be a hyphenated string of {lower_bound}-{upper_bound}, i.e if lower_bound = 10 and upper_bound = 20 all values that are within this bucket will be replaced with "10-20". This can be used on data of type: double, long. If the bound Value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. */ @@ -1246,6 +1307,104 @@ export namespace dlp_v2 { */ proximity?: Schema$GooglePrivacyDlpV2Proximity; } + /** + * An individual hybrid item to inspect. Will be stored temporarily during processing. + */ + export interface Schema$GooglePrivacyDlpV2HybridContentItem { + /** + * Supplementary information that will be added to each finding. + */ + findingDetails?: Schema$GooglePrivacyDlpV2HybridFindingDetails; + /** + * The item to inspect. + */ + item?: Schema$GooglePrivacyDlpV2ContentItem; + } + /** + * Populate to associate additional data with each finding. + */ + export interface Schema$GooglePrivacyDlpV2HybridFindingDetails { + /** + * Details about the container where the content being inspected is from. + */ + containerDetails?: Schema$GooglePrivacyDlpV2Container; + /** + * Offset in bytes of the line, from the beginning of the file, where the finding is located. Populate if the item being scanned is only part of a bigger item, such as a shard of a file and you want to track the absolute position of the finding. + */ + fileOffset?: string | null; + /** + * Labels to represent user provided metadata about the data being inspected. If configured by the job, some key values may be required. The labels associated with `Finding`'s produced by hybrid inspection. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 10 labels can be associated with a given finding. Example: <code>"environment" : "production"</code> Example: <code>"pipeline" : "etl"</code> + */ + labels?: {[key: string]: string} | null; + /** + * Offset of the row for tables. Populate if the row(s) being scanned are part of a bigger dataset and you want to keep track of their absolute position. + */ + rowOffset?: string | null; + /** + * If the container is a table, additional information to make findings meaningful such as the columns that are primary keys. If not known ahead of time, can also be set within each inspect hybrid call and the two will be merged. Note that identifying_fields will only be stored to BigQuery, and only if the BigQuery action has been included. + */ + tableOptions?: Schema$GooglePrivacyDlpV2TableOptions; + } + /** + * Request to search for potentially sensitive info in a custom location. + */ + export interface Schema$GooglePrivacyDlpV2HybridInspectDlpJobRequest { + /** + * The item to inspect. + */ + hybridItem?: Schema$GooglePrivacyDlpV2HybridContentItem; + } + /** + * Request to search for potentially sensitive info in a custom location. + */ + export interface Schema$GooglePrivacyDlpV2HybridInspectJobTriggerRequest { + /** + * The item to inspect. + */ + hybridItem?: Schema$GooglePrivacyDlpV2HybridContentItem; + } + /** + * Quota exceeded errors will be thrown once quota has been met. + */ + export interface Schema$GooglePrivacyDlpV2HybridInspectResponse {} + /** + * Statistics related to processing hybrid inspect requests. + */ + export interface Schema$GooglePrivacyDlpV2HybridInspectStatistics { + /** + * The number of hybrid inspection requests aborted because the job ran out of quota or was ended before they could be processed. + */ + abortedCount?: string | null; + /** + * The number of hybrid requests currently being processed. Only populated when called via method `getDlpJob`. A burst of traffic may cause hybrid inspect requests to be enqueued. Processing will take place as quickly as possible, but resource limitations may impact how long a request is enqueued for. + */ + pendingCount?: string | null; + /** + * The number of hybrid inspection requests processed within this job. + */ + processedCount?: string | null; + } + /** + * Configuration to control jobs where the content being inspected is outside of Google Cloud Platform. + */ + export interface Schema$GooglePrivacyDlpV2HybridOptions { + /** + * A short description of where the data is coming from. Will be stored once in the job. 256 max length. + */ + description?: string | null; + /** + * To organize findings, these labels will be added to each finding. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 10 labels can be associated with a given finding. Example: <code>"environment" : "production"</code> Example: <code>"pipeline" : "etl"</code> + */ + labels?: {[key: string]: string} | null; + /** + * These are labels that each inspection request must include within their 'finding_labels' map. Request may contain others, but any missing one of these will be rejected. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. No more than 10 keys can be required. + */ + requiredFindingLabelKeys?: string[] | null; + /** + * If the container is a table, additional information to make findings meaningful such as the columns that are primary keys. + */ + tableOptions?: Schema$GooglePrivacyDlpV2TableOptions; + } /** * Location of the finding within an image. */ @@ -1929,6 +2088,10 @@ export namespace dlp_v2 { */ contentLocations?: Schema$GooglePrivacyDlpV2ContentLocation[]; } + /** + * Job trigger option for hybrid jobs. Jobs must be manually created and finished. + */ + export interface Schema$GooglePrivacyDlpV2Manual {} /** * Compute numerical stats over an individual column, including min, max, and quantiles. */ @@ -1960,7 +2123,7 @@ export namespace dlp_v2 { */ export interface Schema$GooglePrivacyDlpV2OutputStorageConfig { /** - * Schema used for writing the findings for Inspect jobs. This field is only used for Inspect and must be unspecified for Risk jobs. Columns are derived from the `Finding` object. If appending to an existing table, any columns from the predefined schema that are missing will be added. No columns in the existing table will be deleted. If unspecified, then all available columns will be used for a new table or an (existing) table with no schema, and no changes will be made to an existing table that has a schema. + * Schema used for writing the findings for Inspect jobs. This field is only used for Inspect and must be unspecified for Risk jobs. Columns are derived from the `Finding` object. If appending to an existing table, any columns from the predefined schema that are missing will be added. No columns in the existing table will be deleted. If unspecified, then all available columns will be used for a new table or an (existing) table with no schema, and no changes will be made to an existing table that has a schema. Only for use with external storage. */ outputSchema?: string | null; /** @@ -2369,6 +2532,10 @@ export namespace dlp_v2 { * All result fields mentioned below are updated while the job is processing. */ export interface Schema$GooglePrivacyDlpV2Result { + /** + * Statistics related to the processing of hybrid inspect. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages. + */ + hybridStats?: Schema$GooglePrivacyDlpV2HybridInspectStatistics; /** * Statistics of how many instances of each info type were found during inspect job. */ @@ -2459,6 +2626,10 @@ export namespace dlp_v2 { * Google Cloud Datastore options. */ datastoreOptions?: Schema$GooglePrivacyDlpV2DatastoreOptions; + /** + * Hybrid inspection options. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages. + */ + hybridOptions?: Schema$GooglePrivacyDlpV2HybridOptions; timespanConfig?: Schema$GooglePrivacyDlpV2TimespanConfig; } /** @@ -2486,6 +2657,10 @@ export namespace dlp_v2 { * Description of the StoredInfoType (max 256 characters). */ description?: string | null; + /** + * Store dictionary-based CustomInfoType. + */ + dictionary?: Schema$GooglePrivacyDlpV2Dictionary; /** * Display name of the StoredInfoType (max 256 characters). */ @@ -2494,6 +2669,10 @@ export namespace dlp_v2 { * StoredInfoType where findings are defined by a dictionary of phrases. */ largeCustomDictionary?: Schema$GooglePrivacyDlpV2LargeCustomDictionaryConfig; + /** + * Store regular expression-based StoredInfoType. + */ + regex?: Schema$GooglePrivacyDlpV2Regex; } /** * Statistics for a StoredInfoType. @@ -2585,6 +2764,15 @@ export namespace dlp_v2 { */ rowIndex?: string | null; } + /** + * Instructions regarding the table content being inspected. + */ + export interface Schema$GooglePrivacyDlpV2TableOptions { + /** + * The columns that are the primary keys for table objects included in ContentItem. A copy of this cell's value will stored alongside alongside each finding so that the finding can be traced to the specific row it came from. No more than 3 may be provided. + */ + identifyingFields?: Schema$GooglePrivacyDlpV2FieldId[]; + } /** * A column with a semantic tag attached. */ @@ -2721,6 +2909,10 @@ export namespace dlp_v2 { * What event needs to occur for a new job to be started. */ export interface Schema$GooglePrivacyDlpV2Trigger { + /** + * For use with hybrid jobs. Jobs must be manually created and finished. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages. + */ + manual?: Schema$GooglePrivacyDlpV2Manual; /** * Create a job on a repeating basis based on the elapse of time. */ @@ -10142,6 +10334,78 @@ export namespace dlp_v2 { } } + /** + * dlp.projects.locations.dlpJobs.finish + * @desc Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages. + * @alias dlp.projects.locations.dlpJobs.finish + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the DlpJob resource to be cancelled. + * @param {().GooglePrivacyDlpV2FinishDlpJobRequest} params.requestBody 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 + */ + finish( + params?: Params$Resource$Projects$Locations$Dlpjobs$Finish, + options?: MethodOptions + ): GaxiosPromise; + finish( + params: Params$Resource$Projects$Locations$Dlpjobs$Finish, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + finish( + params: Params$Resource$Projects$Locations$Dlpjobs$Finish, + callback: BodyResponseCallback + ): void; + finish(callback: BodyResponseCallback): void; + finish( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Dlpjobs$Finish + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Dlpjobs$Finish; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Dlpjobs$Finish; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dlp.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:finish').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + /** * dlp.projects.locations.dlpJobs.get * @desc Gets the latest state of a long-running DlpJob. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. @@ -10215,6 +10479,98 @@ export namespace dlp_v2 { } } + /** + * dlp.projects.locations.dlpJobs.hybridInspect + * @desc Inspect hybrid content and store findings to a job. To review the findings inspect the job. Inspection will occur asynchronously. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages. + * @alias dlp.projects.locations.dlpJobs.hybridInspect + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name of the job to execute a hybrid inspect on, for example `projects/dlp-test-project/dlpJob/53234423`. + * @param {().GooglePrivacyDlpV2HybridInspectDlpJobRequest} params.requestBody 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 + */ + hybridInspect( + params?: Params$Resource$Projects$Locations$Dlpjobs$Hybridinspect, + options?: MethodOptions + ): GaxiosPromise; + hybridInspect( + params: Params$Resource$Projects$Locations$Dlpjobs$Hybridinspect, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void; + hybridInspect( + params: Params$Resource$Projects$Locations$Dlpjobs$Hybridinspect, + callback: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void; + hybridInspect( + callback: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void; + hybridInspect( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Dlpjobs$Hybridinspect + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Dlpjobs$Hybridinspect; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Dlpjobs$Hybridinspect; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dlp.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:hybridInspect').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + /** * dlp.projects.locations.dlpJobs.list * @desc Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. @@ -10362,6 +10718,23 @@ export namespace dlp_v2 { */ name?: string; } + export interface Params$Resource$Projects$Locations$Dlpjobs$Finish + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the DlpJob resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GooglePrivacyDlpV2FinishDlpJobRequest; + } export interface Params$Resource$Projects$Locations$Dlpjobs$Get extends StandardParameters { /** @@ -10374,6 +10747,23 @@ export namespace dlp_v2 { */ name?: string; } + export interface Params$Resource$Projects$Locations$Dlpjobs$Hybridinspect + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Resource name of the job to execute a hybrid inspect on, for example `projects/dlp-test-project/dlpJob/53234423`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GooglePrivacyDlpV2HybridInspectDlpJobRequest; + } export interface Params$Resource$Projects$Locations$Dlpjobs$List extends StandardParameters { /** @@ -11368,6 +11758,98 @@ export namespace dlp_v2 { } } + /** + * dlp.projects.locations.jobTriggers.hybridInspect + * @desc Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger. Early access feature is in a pre-release state and might change or have limited support. For more information, see https://cloud.google.com/products#product-launch-stages. + * @alias dlp.projects.locations.jobTriggers.hybridInspect + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Resource name of the trigger to execute a hybrid inspect on, for example `projects/dlp-test-project/jobTriggers/53234423`. + * @param {().GooglePrivacyDlpV2HybridInspectJobTriggerRequest} params.requestBody 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 + */ + hybridInspect( + params?: Params$Resource$Projects$Locations$Jobtriggers$Hybridinspect, + options?: MethodOptions + ): GaxiosPromise; + hybridInspect( + params: Params$Resource$Projects$Locations$Jobtriggers$Hybridinspect, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void; + hybridInspect( + params: Params$Resource$Projects$Locations$Jobtriggers$Hybridinspect, + callback: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void; + hybridInspect( + callback: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void; + hybridInspect( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Jobtriggers$Hybridinspect + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GooglePrivacyDlpV2HybridInspectResponse + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Jobtriggers$Hybridinspect; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Jobtriggers$Hybridinspect; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dlp.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:hybridInspect').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + /** * dlp.projects.locations.jobTriggers.list * @desc Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. @@ -11613,6 +12095,23 @@ export namespace dlp_v2 { */ name?: string; } + export interface Params$Resource$Projects$Locations$Jobtriggers$Hybridinspect + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Resource name of the trigger to execute a hybrid inspect on, for example `projects/dlp-test-project/jobTriggers/53234423`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GooglePrivacyDlpV2HybridInspectJobTriggerRequest; + } export interface Params$Resource$Projects$Locations$Jobtriggers$List extends StandardParameters { /** diff --git a/src/apis/drive/v2.ts b/src/apis/drive/v2.ts index 858e38d884..94c8679fa7 100644 --- a/src/apis/drive/v2.ts +++ b/src/apis/drive/v2.ts @@ -847,6 +847,7 @@ export namespace drive_v2 { */ capabilities?: { canAddChildren?: boolean; + canAddMyDriveParent?: boolean; canChangeCopyRequiresWriterPermission?: boolean; canChangeRestrictedDownload?: boolean; canComment?: boolean; @@ -871,6 +872,7 @@ export namespace drive_v2 { canReadRevisions?: boolean; canReadTeamDrive?: boolean; canRemoveChildren?: boolean; + canRemoveMyDriveParent?: boolean; canRename?: boolean; canShare?: boolean; canTrash?: boolean; @@ -2549,6 +2551,7 @@ export namespace drive_v2 { * * @param {object} params Parameters for request * @param {string} params.childId The ID of the child. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root. * @param {string} params.folderId The ID of the folder. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2692,6 +2695,7 @@ export namespace drive_v2 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. * @param {string} params.folderId The ID of the folder. * @param {boolean=} params.supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. * @param {boolean=} params.supportsTeamDrives Deprecated use supportsAllDrives instead. @@ -2849,6 +2853,10 @@ export namespace drive_v2 { * The ID of the child. */ childId?: string; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root. + */ + enforceSingleParent?: boolean; /** * The ID of the folder. */ @@ -2875,6 +2883,10 @@ export namespace drive_v2 { */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. + */ + enforceSingleParent?: boolean; /** * The ID of the folder. */ @@ -4111,6 +4123,7 @@ export namespace drive_v2 { * * @param {object} params Parameters for request * @param {boolean=} params.convert Whether to convert this file to the corresponding Google Docs format. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. * @param {string} params.fileId The ID of the file to copy. * @param {boolean=} params.ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. * @param {string=} params.ocrLanguage If ocr is true, hints at the language to use. Valid values are BCP 47 codes. @@ -4559,6 +4572,7 @@ export namespace drive_v2 { * * @param {object} params Parameters for request * @param {boolean=} params.convert Whether to convert this file to the corresponding Google Docs format. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. * @param {boolean=} params.ocr Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. * @param {string=} params.ocrLanguage If ocr is true, hints at the language to use. Valid values are BCP 47 codes. * @param {boolean=} params.pinned Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions. @@ -4726,6 +4740,7 @@ export namespace drive_v2 { * @param {object} params Parameters for request * @param {string=} params.addParents Comma-separated list of parent IDs to add. * @param {boolean=} params.convert This parameter is deprecated and has no function. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. * @param {string} params.fileId The ID of the file to update. * @param {string=} params.modifiedDateBehavior Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate. * @param {boolean=} params.newRevision Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. @@ -5032,6 +5047,7 @@ export namespace drive_v2 { * @param {object} params Parameters for request * @param {string=} params.addParents Comma-separated list of parent IDs to add. * @param {boolean=} params.convert This parameter is deprecated and has no function. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. * @param {string} params.fileId The ID of the file to update. * @param {string=} params.modifiedDateBehavior Determines the behavior in which modifiedDate is updated. This overrides setModifiedDate. * @param {boolean=} params.newRevision Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained, see the Drive Help Center. @@ -5206,6 +5222,10 @@ export namespace drive_v2 { * Whether to convert this file to the corresponding Google Docs format. */ convert?: boolean; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. + */ + enforceSingleParent?: boolean; /** * The ID of the file to copy. */ @@ -5349,6 +5369,10 @@ export namespace drive_v2 { * Whether to convert this file to the corresponding Google Docs format. */ convert?: boolean; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. + */ + enforceSingleParent?: boolean; /** * Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. */ @@ -5483,6 +5507,10 @@ export namespace drive_v2 { * This parameter is deprecated and has no function. */ convert?: boolean; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. + */ + enforceSingleParent?: boolean; /** * The ID of the file to update. */ @@ -5616,6 +5644,10 @@ export namespace drive_v2 { * This parameter is deprecated and has no function. */ convert?: boolean; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. + */ + enforceSingleParent?: boolean; /** * The ID of the file to update. */ @@ -5747,6 +5779,7 @@ export namespace drive_v2 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root. * @param {string} params.fileId The ID of the file. * @param {string} params.parentId The ID of the parent. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -5891,6 +5924,7 @@ export namespace drive_v2 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. * @param {string} params.fileId The ID of the file. * @param {boolean=} params.supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. * @param {boolean=} params.supportsTeamDrives Deprecated use supportsAllDrives instead. @@ -6040,6 +6074,10 @@ export namespace drive_v2 { */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's last parent is removed, the item will be placed under its owner's root. + */ + enforceSingleParent?: boolean; /** * The ID of the file. */ @@ -6070,6 +6108,10 @@ export namespace drive_v2 { */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the child's owner makes the request, the child will be removed from all current folders and placed in the requested folder. Any other requests that increase the number of the child's parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. + */ + enforceSingleParent?: boolean; /** * The ID of the file. */ @@ -6339,7 +6381,9 @@ export namespace drive_v2 { * * @param {object} params Parameters for request * @param {string=} params.emailMessage A plain text custom message to include in notification emails. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details. * @param {string} params.fileId The ID for the file or shared drive. + * @param {boolean=} params.moveToNewOwnersRoot This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. * @param {boolean=} params.sendNotificationEmails Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner. * @param {boolean=} params.supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. * @param {boolean=} params.supportsTeamDrives Deprecated use supportsAllDrives instead. @@ -6728,10 +6772,18 @@ export namespace drive_v2 { * A plain text custom message to include in notification emails. */ emailMessage?: string; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details. + */ + enforceSingleParent?: boolean; /** * The ID for the file or shared drive. */ fileId?: string; + /** + * This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. + */ + moveToNewOwnersRoot?: boolean; /** * Whether to send notification emails when sharing to users or groups. This parameter is ignored and an email is sent if the role is owner. */ diff --git a/src/apis/drive/v3.ts b/src/apis/drive/v3.ts index f020f3e0c1..c4780bf601 100644 --- a/src/apis/drive/v3.ts +++ b/src/apis/drive/v3.ts @@ -480,6 +480,7 @@ export namespace drive_v3 { */ capabilities?: { canAddChildren?: boolean; + canAddMyDriveParent?: boolean; canChangeCopyRequiresWriterPermission?: boolean; canChangeViewersCanCopyContent?: boolean; canComment?: boolean; @@ -504,6 +505,7 @@ export namespace drive_v3 { canReadRevisions?: boolean; canReadTeamDrive?: boolean; canRemoveChildren?: boolean; + canRemoveMyDriveParent?: boolean; canRename?: boolean; canShare?: boolean; canTrash?: boolean; @@ -2796,6 +2798,7 @@ export namespace drive_v3 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. * @param {string} params.fileId The ID of the file. * @param {boolean=} params.ignoreDefaultVisibility Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. * @param {boolean=} params.keepRevisionForever Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. @@ -2873,6 +2876,7 @@ export namespace drive_v3 { * @memberOf! () * * @param {object} params Parameters for request + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. * @param {boolean=} params.ignoreDefaultVisibility Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. * @param {boolean=} params.keepRevisionForever Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. * @param {string=} params.ocrLanguage A language hint for OCR processing during image import (ISO 639-1 code). @@ -3399,6 +3403,7 @@ export namespace drive_v3 { * * @param {object} params Parameters for request * @param {string=} params.addParents A comma-separated list of parent IDs to add. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. * @param {string} params.fileId The ID of the file. * @param {boolean=} params.keepRevisionForever Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. * @param {string=} params.ocrLanguage A language hint for OCR processing during image import (ISO 639-1 code). @@ -3559,6 +3564,10 @@ export namespace drive_v3 { */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. + */ + enforceSingleParent?: boolean; /** * The ID of the file. */ @@ -3595,6 +3604,10 @@ export namespace drive_v3 { */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. Requests that specify more than one parent will fail. + */ + enforceSingleParent?: boolean; /** * Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. */ @@ -3788,6 +3801,10 @@ export namespace drive_v3 { * A comma-separated list of parent IDs to add. */ addParents?: string; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. If the item's owner makes a request to add a single parent, the item will be removed from all current folders and placed in the requested folder. Other requests that increase the number of parents will fail, except when the canAddMyDriveParent file capability is true and a single parent is being added. + */ + enforceSingleParent?: boolean; /** * The ID of the file. */ @@ -3880,7 +3897,9 @@ export namespace drive_v3 { * * @param {object} params Parameters for request * @param {string=} params.emailMessage A plain text custom message to include in the notification email. + * @param {boolean=} params.enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details. * @param {string} params.fileId The ID of the file or shared drive. + * @param {boolean=} params.moveToNewOwnersRoot This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. * @param {boolean=} params.sendNotificationEmail Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers. * @param {boolean=} params.supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. * @param {boolean=} params.supportsTeamDrives Deprecated use supportsAllDrives instead. @@ -4274,10 +4293,18 @@ export namespace drive_v3 { * A plain text custom message to include in the notification email. */ emailMessage?: string; + /** + * Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details. + */ + enforceSingleParent?: boolean; /** * The ID of the file or shared drive. */ fileId?: string; + /** + * This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. + */ + moveToNewOwnersRoot?: boolean; /** * Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers. */ diff --git a/src/apis/file/v1.ts b/src/apis/file/v1.ts index 2f77fa37a2..e5e5739e95 100644 --- a/src/apis/file/v1.ts +++ b/src/apis/file/v1.ts @@ -136,9 +136,6 @@ export namespace file_v1 { */ name?: string | null; } - /** - * Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project=snapchat, producer-project=cloud-sql: ```json Instance: { "name": "projects/snapchat/locations/us-east1/instances/prod-instance", "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" }, "state": READY, "software_versions": { "software_update": "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy": "projects/snapchat/locations/us-east1/maintenancePolicies/prod-update-policy", } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": { "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { "resource-type": "compute-instance", "resource-url": "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name": "my-sql-instance1", } ``` - */ export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1Instance { /** * consumer_defined_name is the name that is set by the consumer. On the other hand Name field represents system-assigned id of an instance so consumers are not necessarily aware of it. consumer_defined_name is used for notification/UI purposes for consumer to recognize their instances. @@ -174,12 +171,6 @@ export namespace file_v1 { * Output only. The list of data plane resources provisioned for this instance, e.g. compute VMs. See go/get-instance-metadata. */ provisionedResources?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource[]; - /** - * The map between RolloutType and the corresponding RolloutMetadata. This is only mutated by rollout service. For actuation implementation, this information is pass-through for Rollout management. Producer shall not modify by itself. For update of a single entry in this map, the update field mask shall follow this sementics: go/advanced-field-masks - */ - rolloutMetadata?: { - [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata; - } | null; /** * Link to the SLM instance template. Only populated when updating SLM instances via SSA's Actuation service adaptor. Service producers with custom control plane (e.g. Cloud SQL) doesn't need to populate this field. Instead they should use software_versions. */ @@ -243,27 +234,6 @@ export namespace file_v1 { */ nodeId?: string | null; } - /** - * This message has been deprecated. NotificationMetadata is the notification state for an instance. - */ - export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata { - /** - * Whether the instance update has been rescheduled. - */ - rescheduled?: boolean | null; - /** - * The scheduled end time for the maintenance window during which update can be performed on the instance. - */ - scheduledEndTime?: string | null; - /** - * The scheduled start time for the maintenance window during which update can be performed on the instance. - */ - scheduledStartTime?: string | null; - /** - * The target release to be applied to the instance. - */ - targetRelease?: string | null; - } /** * Describes provisioned dataplane resources. */ @@ -277,23 +247,6 @@ export namespace file_v1 { */ resourceUrl?: string | null; } - /** - * This message has been deprecated. RolloutMetadata for an actuation instance. It maps to a single RolloutType. - */ - export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata { - /** - * Instance level notification metadata. - */ - notification?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata; - /** - * The last Release that has been applied to the instance. - */ - releaseName?: string | null; - /** - * The last rollout that has been applied to the instance. - */ - rolloutName?: string | null; - } /** * SloEligibility is a tuple containing eligibility value: true if an instance is eligible for SLO calculation or false if it should be excluded from all SLO-related calculations along with a user-defined reason. */ diff --git a/src/apis/file/v1beta1.ts b/src/apis/file/v1beta1.ts index bcc329874b..2162bb6df5 100644 --- a/src/apis/file/v1beta1.ts +++ b/src/apis/file/v1beta1.ts @@ -136,9 +136,6 @@ export namespace file_v1beta1 { */ name?: string | null; } - /** - * Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project=snapchat, producer-project=cloud-sql: ```json Instance: { "name": "projects/snapchat/locations/us-east1/instances/prod-instance", "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" }, "state": READY, "software_versions": { "software_update": "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy": "projects/snapchat/locations/us-east1/maintenancePolicies/prod-update-policy", } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": { "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { "resource-type": "compute-instance", "resource-url": "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name": "my-sql-instance1", } ``` - */ export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1Instance { /** * consumer_defined_name is the name that is set by the consumer. On the other hand Name field represents system-assigned id of an instance so consumers are not necessarily aware of it. consumer_defined_name is used for notification/UI purposes for consumer to recognize their instances. @@ -174,12 +171,6 @@ export namespace file_v1beta1 { * Output only. The list of data plane resources provisioned for this instance, e.g. compute VMs. See go/get-instance-metadata. */ provisionedResources?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource[]; - /** - * The map between RolloutType and the corresponding RolloutMetadata. This is only mutated by rollout service. For actuation implementation, this information is pass-through for Rollout management. Producer shall not modify by itself. For update of a single entry in this map, the update field mask shall follow this sementics: go/advanced-field-masks - */ - rolloutMetadata?: { - [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata; - } | null; /** * Link to the SLM instance template. Only populated when updating SLM instances via SSA's Actuation service adaptor. Service producers with custom control plane (e.g. Cloud SQL) doesn't need to populate this field. Instead they should use software_versions. */ @@ -243,27 +234,6 @@ export namespace file_v1beta1 { */ nodeId?: string | null; } - /** - * This message has been deprecated. NotificationMetadata is the notification state for an instance. - */ - export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata { - /** - * Whether the instance update has been rescheduled. - */ - rescheduled?: boolean | null; - /** - * The scheduled end time for the maintenance window during which update can be performed on the instance. - */ - scheduledEndTime?: string | null; - /** - * The scheduled start time for the maintenance window during which update can be performed on the instance. - */ - scheduledStartTime?: string | null; - /** - * The target release to be applied to the instance. - */ - targetRelease?: string | null; - } /** * Describes provisioned dataplane resources. */ @@ -277,23 +247,6 @@ export namespace file_v1beta1 { */ resourceUrl?: string | null; } - /** - * This message has been deprecated. RolloutMetadata for an actuation instance. It maps to a single RolloutType. - */ - export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata { - /** - * Instance level notification metadata. - */ - notification?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata; - /** - * The last Release that has been applied to the instance. - */ - releaseName?: string | null; - /** - * The last rollout that has been applied to the instance. - */ - rolloutName?: string | null; - } /** * SloEligibility is a tuple containing eligibility value: true if an instance is eligible for SLO calculation or false if it should be excluded from all SLO-related calculations along with a user-defined reason. */ diff --git a/src/apis/firebase/v1beta1.ts b/src/apis/firebase/v1beta1.ts index 6df329f520..3a9ba2818c 100644 --- a/src/apis/firebase/v1beta1.ts +++ b/src/apis/firebase/v1beta1.ts @@ -1698,7 +1698,7 @@ export namespace firebase_v1beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent The parent Project for which to list Apps, in the format:
projects/projectId + * @param {string} params.parent The parent Project in which to create an App, in the format:
projects/projectId * @param {().AndroidApp} params.requestBody 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. @@ -2068,7 +2068,7 @@ export namespace firebase_v1beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The parent Project for which to list Apps, in the format:
projects/projectId + * The parent Project in which to create an App, in the format:
projects/projectId */ parent?: string; @@ -2642,7 +2642,7 @@ export namespace firebase_v1beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent The parent Project for which to list Apps, in the format:
projects/projectId + * @param {string} params.parent The parent Project in which to create an App, in the format:
projects/projectId * @param {().IosApp} params.requestBody 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. @@ -3006,7 +3006,7 @@ export namespace firebase_v1beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The parent Project for which to list Apps, in the format:
projects/projectId + * The parent Project in which to create an App, in the format:
projects/projectId */ parent?: string; @@ -3094,7 +3094,7 @@ export namespace firebase_v1beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent The parent Project for which to list Apps, in the format:
projects/projectId + * @param {string} params.parent The parent Project in which to create an App, in the format:
projects/projectId * @param {().WebApp} params.requestBody 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. @@ -3458,7 +3458,7 @@ export namespace firebase_v1beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The parent Project for which to list Apps, in the format:
projects/projectId + * The parent Project in which to create an App, in the format:
projects/projectId */ parent?: string; diff --git a/src/apis/firebasehosting/v1beta1.ts b/src/apis/firebasehosting/v1beta1.ts index 81d1f0ce51..039dc5832c 100644 --- a/src/apis/firebasehosting/v1beta1.ts +++ b/src/apis/firebasehosting/v1beta1.ts @@ -605,9 +605,11 @@ export namespace firebasehosting_v1beta1 { export class Resource$Projects { context: APIRequestContext; operations: Resource$Projects$Operations; + sites: Resource$Projects$Sites; constructor(context: APIRequestContext) { this.context = context; this.operations = new Resource$Projects$Operations(this.context); + this.sites = new Resource$Projects$Sites(this.context); } } @@ -703,13 +705,443 @@ export namespace firebasehosting_v1beta1 { name?: string; } + export class Resource$Projects$Sites { + context: APIRequestContext; + channels: Resource$Projects$Sites$Channels; + releases: Resource$Projects$Sites$Releases; + constructor(context: APIRequestContext) { + this.context = context; + this.channels = new Resource$Projects$Sites$Channels(this.context); + this.releases = new Resource$Projects$Sites$Releases(this.context); + } + } + + export class Resource$Projects$Sites$Channels { + context: APIRequestContext; + releases: Resource$Projects$Sites$Channels$Releases; + constructor(context: APIRequestContext) { + this.context = context; + this.releases = new Resource$Projects$Sites$Channels$Releases( + this.context + ); + } + } + + export class Resource$Projects$Sites$Channels$Releases { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * firebasehosting.projects.sites.channels.releases.create + * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). + * @alias firebasehosting.projects.sites.channels.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.requestBody 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$Sites$Channels$Releases$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Sites$Channels$Releases$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Sites$Channels$Releases$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Channels$Releases$Create + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Channels$Releases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Channels$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.projects.sites.channels.releases.list + * @desc Lists the releases that have been created on the specified site. + * @alias firebasehosting.projects.sites.channels.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$Projects$Sites$Channels$Releases$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Channels$Releases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$Channels$Releases$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Channels$Releases$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Channels$Releases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Channels$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Sites$Channels$Releases$Create + extends StandardParameters { + /** + * 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$Projects$Sites$Channels$Releases$List + extends StandardParameters { + /** + * 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$Projects$Sites$Releases { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * firebasehosting.projects.sites.releases.create + * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). + * @alias firebasehosting.projects.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.requestBody 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$Sites$Releases$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Sites$Releases$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Sites$Releases$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Releases$Create + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Releases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.projects.sites.releases.list + * @desc Lists the releases that have been created on the specified site. + * @alias firebasehosting.projects.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$Projects$Sites$Releases$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$Releases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$Releases$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Releases$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Releases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Sites$Releases$Create + extends StandardParameters { + /** + * 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$Projects$Sites$Releases$List + extends StandardParameters { + /** + * 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 { context: APIRequestContext; + channels: Resource$Sites$Channels; domains: Resource$Sites$Domains; releases: Resource$Sites$Releases; versions: Resource$Sites$Versions; constructor(context: APIRequestContext) { this.context = context; + this.channels = new Resource$Sites$Channels(this.context); this.domains = new Resource$Sites$Domains(this.context); this.releases = new Resource$Sites$Releases(this.context); this.versions = new Resource$Sites$Versions(this.context); @@ -894,6 +1326,218 @@ export namespace firebasehosting_v1beta1 { requestBody?: Schema$SiteConfig; } + export class Resource$Sites$Channels { + context: APIRequestContext; + releases: Resource$Sites$Channels$Releases; + constructor(context: APIRequestContext) { + this.context = context; + this.releases = new Resource$Sites$Channels$Releases(this.context); + } + } + + export class Resource$Sites$Channels$Releases { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * firebasehosting.sites.channels.releases.create + * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). + * @alias firebasehosting.sites.channels.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.requestBody 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$Channels$Releases$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Sites$Channels$Releases$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Sites$Channels$Releases$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Sites$Channels$Releases$Create + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sites$Channels$Releases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Channels$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * firebasehosting.sites.channels.releases.list + * @desc Lists the releases that have been created on the specified site. + * @alias firebasehosting.sites.channels.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$Channels$Releases$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Sites$Channels$Releases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Sites$Channels$Releases$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Sites$Channels$Releases$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Sites$Channels$Releases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Sites$Channels$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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Sites$Channels$Releases$Create + extends StandardParameters { + /** + * 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$Channels$Releases$List + extends StandardParameters { + /** + * 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$Domains { context: APIRequestContext; constructor(context: APIRequestContext) { @@ -1350,7 +1994,7 @@ export namespace firebasehosting_v1beta1 { /** * firebasehosting.sites.releases.create - * @desc Creates a new release which makes the content of the specified version actively display on the site. + * @desc Creates a new release which makes the content of the specified version actively display on the appropriate URL(s). * @alias firebasehosting.sites.releases.create * @memberOf! () * diff --git a/src/apis/gamesConfiguration/README.md b/src/apis/gamesConfiguration/README.md new file mode 100644 index 0000000000..31873faaa2 --- /dev/null +++ b/src/apis/gamesConfiguration/README.md @@ -0,0 +1,47 @@ +Google Inc. logo + +# gamesConfiguration + +> The Publishing API for Google Play Game Services. + +## Installation + +```sh +$ npm install googleapis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). + +## Building a browser bundle + +This library can be used in a browser. To prepare a single file bundle, clone the +[repository](https://github.com/googleapis/google-api-nodejs-client) and run + +```sh +$ cd src/apis/gamesConfiguration +$ npm install +$ npm run webpack +``` + +The generated bundle will be written to `dist/gamesConfiguration.min.js`. Use it from your HTML file: + +```html + + +``` + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE). + +## 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/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/gamesConfiguration/index.ts b/src/apis/gamesConfiguration/index.ts new file mode 100644 index 0000000000..6b24fb5f93 --- /dev/null +++ b/src/apis/gamesConfiguration/index.ts @@ -0,0 +1,41 @@ +// Copyright 2019 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 {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {gamesConfiguration_v1configuration} from './v1configuration'; + +export const VERSIONS = { + v1configuration: gamesConfiguration_v1configuration.Gamesconfiguration, +}; + +export function gamesConfiguration( + version: 'v1configuration' +): gamesConfiguration_v1configuration.Gamesconfiguration; +export function gamesConfiguration( + options: gamesConfiguration_v1configuration.Options +): gamesConfiguration_v1configuration.Gamesconfiguration; +export function gamesConfiguration< + T = gamesConfiguration_v1configuration.Gamesconfiguration +>( + this: GoogleConfigurable, + versionOrOptions: + | 'v1configuration' + | gamesConfiguration_v1configuration.Options +) { + return getAPI('gamesConfiguration', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; diff --git a/src/apis/gamesConfiguration/package.json b/src/apis/gamesConfiguration/package.json new file mode 100644 index 0000000000..530e8816cf --- /dev/null +++ b/src/apis/gamesConfiguration/package.json @@ -0,0 +1,43 @@ +{ + "name": "@google/gamesConfiguration", + "version": "0.1.0", + "description": "gamesConfiguration", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^3.0.0" + }, + "devDependencies": { + "gts": "^1.0.0", + "null-loader": "^3.0.0", + "ts-loader": "^6.0.4", + "typedoc": "^0.16.0", + "typescript": "~3.7.0", + "webpack": "^4.35.3", + "webpack-cli": "^3.3.5" + } +} diff --git a/src/apis/gamesConfiguration/tsconfig.json b/src/apis/gamesConfiguration/tsconfig.json new file mode 100644 index 0000000000..e081090496 --- /dev/null +++ b/src/apis/gamesConfiguration/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/gamesConfiguration/v1configuration.ts b/src/apis/gamesConfiguration/v1configuration.ts new file mode 100644 index 0000000000..f30a22bbb8 --- /dev/null +++ b/src/apis/gamesConfiguration/v1configuration.ts @@ -0,0 +1,1648 @@ +// Copyright 2019 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. + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, +} from 'google-auth-library'; +import { + GoogleConfigurable, + createAPIRequest, + MethodOptions, + GlobalOptions, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {GaxiosPromise} from 'gaxios'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace gamesConfiguration_v1configuration { + export interface Options extends GlobalOptions { + version: 'v1configuration'; + } + + interface StandardParameters { + /** + * Data format for the response. + */ + alt?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * An opaque string that represents a user for quota purposes. Must not exceed 40 characters. + */ + quotaUser?: string; + /** + * Deprecated. Please use quotaUser instead. + */ + userIp?: string; + } + + /** + * Google Play Game Services Publishing API + * + * The Publishing API for Google Play Game Services. + * + * @example + * const {google} = require('googleapis'); + * const gamesConfiguration = google.gamesConfiguration('v1configuration'); + * + * @namespace gamesConfiguration + * @type {Function} + * @version v1configuration + * @variation v1configuration + * @param {object=} options Options for Gamesconfiguration + */ + export class Gamesconfiguration { + context: APIRequestContext; + achievementConfigurations: Resource$Achievementconfigurations; + imageConfigurations: Resource$Imageconfigurations; + leaderboardConfigurations: Resource$Leaderboardconfigurations; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.achievementConfigurations = new Resource$Achievementconfigurations( + this.context + ); + this.imageConfigurations = new Resource$Imageconfigurations(this.context); + this.leaderboardConfigurations = new Resource$Leaderboardconfigurations( + this.context + ); + } + } + + /** + * This is a JSON template for an achievement configuration resource. + */ + export interface Schema$AchievementConfiguration { + /** + * The type of the achievement. Possible values are: - "STANDARD" - Achievement is either locked or unlocked. - "INCREMENTAL" - Achievement is incremental. + */ + achievementType?: string | null; + /** + * The draft data of the achievement. + */ + draft?: Schema$AchievementConfigurationDetail; + /** + * The ID of the achievement. + */ + id?: string | null; + /** + * The initial state of the achievement. Possible values are: - "HIDDEN" - Achievement is hidden. - "REVEALED" - Achievement is revealed. - "UNLOCKED" - Achievement is unlocked. + */ + initialState?: string | null; + /** + * Uniquely identifies the type of this resource. Value is always the fixed string gamesConfiguration#achievementConfiguration. + */ + kind?: string | null; + /** + * The read-only published data of the achievement. + */ + published?: Schema$AchievementConfigurationDetail; + /** + * Steps to unlock. Only applicable to incremental achievements. + */ + stepsToUnlock?: number | null; + /** + * The token for this resource. + */ + token?: string | null; + } + /** + * This is a JSON template for an achievement configuration detail. + */ + export interface Schema$AchievementConfigurationDetail { + /** + * Localized strings for the achievement description. + */ + description?: Schema$LocalizedStringBundle; + /** + * The icon url of this achievement. Writes to this field are ignored. + */ + iconUrl?: string | null; + /** + * Uniquely identifies the type of this resource. Value is always the fixed string gamesConfiguration#achievementConfigurationDetail. + */ + kind?: string | null; + /** + * Localized strings for the achievement name. + */ + name?: Schema$LocalizedStringBundle; + /** + * Point value for the achievement. + */ + pointValue?: number | null; + /** + * The sort rank of this achievement. Writes to this field are ignored. + */ + sortRank?: number | null; + } + /** + * This is a JSON template for a ListConfigurations response. + */ + export interface Schema$AchievementConfigurationListResponse { + /** + * The achievement configurations. + */ + items?: Schema$AchievementConfiguration[]; + /** + * Uniquely identifies the type of this resource. Value is always the fixed string games#achievementConfigurationListResponse. + */ + kind?: string | null; + /** + * The pagination token for the next page of results. + */ + nextPageToken?: string | null; + } + /** + * This is a JSON template for a number affix resource. + */ + export interface Schema$GamesNumberAffixConfiguration { + /** + * When the language requires special treatment of "small" numbers (as with 2, 3, and 4 in Czech; or numbers ending 2, 3, or 4 but not 12, 13, or 14 in Polish). + */ + few?: Schema$LocalizedStringBundle; + /** + * When the language requires special treatment of "large" numbers (as with numbers ending 11-99 in Maltese). + */ + many?: Schema$LocalizedStringBundle; + /** + * When the language requires special treatment of numbers like one (as with the number 1 in English and most other languages; in Russian, any number ending in 1 but not ending in 11 is in this class). + */ + one?: Schema$LocalizedStringBundle; + /** + * When the language does not require special treatment of the given quantity (as with all numbers in Chinese, or 42 in English). + */ + other?: Schema$LocalizedStringBundle; + /** + * When the language requires special treatment of numbers like two (as with 2 in Welsh, or 102 in Slovenian). + */ + two?: Schema$LocalizedStringBundle; + /** + * When the language requires special treatment of the number 0 (as in Arabic). + */ + zero?: Schema$LocalizedStringBundle; + } + /** + * This is a JSON template for a number format resource. + */ + export interface Schema$GamesNumberFormatConfiguration { + /** + * The curreny code string. Only used for CURRENCY format type. + */ + currencyCode?: string | null; + /** + * The formatting for the number. Possible values are: - "NUMERIC" - Numbers are formatted to have no digits or a fixed number of digits after the decimal point according to locale. An optional custom unit can be added. - "TIME_DURATION" - Numbers are formatted to hours, minutes and seconds. - "CURRENCY" - Numbers are formatted to currency according to locale. + */ + numberFormatType?: string | null; + /** + * The number of decimal places for number. Only used for NUMERIC format type. + */ + numDecimalPlaces?: number | null; + /** + * An optional suffix for the NUMERIC format type. These strings follow the same plural rules as all Android string resources. + */ + suffix?: Schema$GamesNumberAffixConfiguration; + } + /** + * This is a JSON template for an image configuration resource. + */ + export interface Schema$ImageConfiguration { + /** + * The image type for the image. + */ + imageType?: string | null; + /** + * Uniquely identifies the type of this resource. Value is always the fixed string gamesConfiguration#imageConfiguration. + */ + kind?: string | null; + /** + * The resource ID of resource which the image belongs to. + */ + resourceId?: string | null; + /** + * The url for this image. + */ + url?: string | null; + } + /** + * This is a JSON template for an leaderboard configuration resource. + */ + export interface Schema$LeaderboardConfiguration { + /** + * The draft data of the leaderboard. + */ + draft?: Schema$LeaderboardConfigurationDetail; + /** + * The ID of the leaderboard. + */ + id?: string | null; + /** + * Uniquely identifies the type of this resource. Value is always the fixed string gamesConfiguration#leaderboardConfiguration. + */ + kind?: string | null; + /** + * The read-only published data of the leaderboard. + */ + published?: Schema$LeaderboardConfigurationDetail; + /** + * Maximum score that can be posted to this leaderboard. + */ + scoreMax?: string | null; + /** + * Minimum score that can be posted to this leaderboard. + */ + scoreMin?: string | null; + /** + * The type of the leaderboard. Possible values are: - "LARGER_IS_BETTER" - Larger scores posted are ranked higher. - "SMALLER_IS_BETTER" - Smaller scores posted are ranked higher. + */ + scoreOrder?: string | null; + /** + * The token for this resource. + */ + token?: string | null; + } + /** + * This is a JSON template for a leaderboard configuration detail. + */ + export interface Schema$LeaderboardConfigurationDetail { + /** + * The icon url of this leaderboard. Writes to this field are ignored. + */ + iconUrl?: string | null; + /** + * Uniquely identifies the type of this resource. Value is always the fixed string gamesConfiguration#leaderboardConfigurationDetail. + */ + kind?: string | null; + /** + * Localized strings for the leaderboard name. + */ + name?: Schema$LocalizedStringBundle; + /** + * The score formatting for the leaderboard. + */ + scoreFormat?: Schema$GamesNumberFormatConfiguration; + /** + * The sort rank of this leaderboard. Writes to this field are ignored. + */ + sortRank?: number | null; + } + /** + * This is a JSON template for a ListConfigurations response. + */ + export interface Schema$LeaderboardConfigurationListResponse { + /** + * The leaderboard configurations. + */ + items?: Schema$LeaderboardConfiguration[]; + /** + * Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardConfigurationListResponse. + */ + kind?: string | null; + /** + * The pagination token for the next page of results. + */ + nextPageToken?: string | null; + } + /** + * This is a JSON template for a localized string resource. + */ + export interface Schema$LocalizedString { + /** + * Uniquely identifies the type of this resource. Value is always the fixed string gamesConfiguration#localizedString. + */ + kind?: string | null; + /** + * The locale string. + */ + locale?: string | null; + /** + * The string value. + */ + value?: string | null; + } + /** + * This is a JSON template for a localized string bundle resource. + */ + export interface Schema$LocalizedStringBundle { + /** + * Uniquely identifies the type of this resource. Value is always the fixed string gamesConfiguration#localizedStringBundle. + */ + kind?: string | null; + /** + * The locale strings. + */ + translations?: Schema$LocalizedString[]; + } + + export class Resource$Achievementconfigurations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * gamesConfiguration.achievementConfigurations.delete + * @desc Delete the achievement configuration with the given ID. + * @alias gamesConfiguration.achievementConfigurations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.achievementId The ID of the achievement used by this method. + * @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$Achievementconfigurations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Achievementconfigurations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Achievementconfigurations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Achievementconfigurations$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Achievementconfigurations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Achievementconfigurations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/achievements/{achievementId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['achievementId'], + pathParams: ['achievementId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.achievementConfigurations.get + * @desc Retrieves the metadata of the achievement configuration with the given ID. + * @alias gamesConfiguration.achievementConfigurations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.achievementId The ID of the achievement used by this method. + * @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$Achievementconfigurations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Achievementconfigurations$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Achievementconfigurations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Achievementconfigurations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Achievementconfigurations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Achievementconfigurations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/achievements/{achievementId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['achievementId'], + pathParams: ['achievementId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.achievementConfigurations.insert + * @desc Insert a new achievement configuration in this application. + * @alias gamesConfiguration.achievementConfigurations.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.applicationId The application ID from the Google Play developer console. + * @param {().AchievementConfiguration} params.requestBody 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 + */ + insert( + params?: Params$Resource$Achievementconfigurations$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Achievementconfigurations$Insert, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Achievementconfigurations$Insert, + callback: BodyResponseCallback + ): void; + insert( + callback: BodyResponseCallback + ): void; + insert( + paramsOrCallback?: + | Params$Resource$Achievementconfigurations$Insert + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Achievementconfigurations$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Achievementconfigurations$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/games/v1configuration/applications/{applicationId}/achievements' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['applicationId'], + pathParams: ['applicationId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.achievementConfigurations.list + * @desc Returns a list of the achievement configurations in this application. + * @alias gamesConfiguration.achievementConfigurations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.applicationId The application ID from the Google Play developer console. + * @param {integer=} params.maxResults The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults. + * @param {string=} params.pageToken The token returned by the previous 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 + */ + list( + params?: Params$Resource$Achievementconfigurations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Achievementconfigurations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$AchievementConfigurationListResponse + > + ): void; + list( + params: Params$Resource$Achievementconfigurations$List, + callback: BodyResponseCallback< + Schema$AchievementConfigurationListResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$AchievementConfigurationListResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Achievementconfigurations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$AchievementConfigurationListResponse + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Achievementconfigurations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Achievementconfigurations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/games/v1configuration/applications/{applicationId}/achievements' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['applicationId'], + pathParams: ['applicationId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * gamesConfiguration.achievementConfigurations.patch + * @desc Update the metadata of the achievement configuration with the given ID. This method supports patch semantics. + * @alias gamesConfiguration.achievementConfigurations.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.achievementId The ID of the achievement used by this method. + * @param {().AchievementConfiguration} params.requestBody 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$Achievementconfigurations$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Achievementconfigurations$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Achievementconfigurations$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Achievementconfigurations$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Achievementconfigurations$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Achievementconfigurations$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/achievements/{achievementId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['achievementId'], + pathParams: ['achievementId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.achievementConfigurations.update + * @desc Update the metadata of the achievement configuration with the given ID. + * @alias gamesConfiguration.achievementConfigurations.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.achievementId The ID of the achievement used by this method. + * @param {().AchievementConfiguration} params.requestBody 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$Achievementconfigurations$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Achievementconfigurations$Update, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Achievementconfigurations$Update, + callback: BodyResponseCallback + ): void; + update( + callback: BodyResponseCallback + ): void; + update( + paramsOrCallback?: + | Params$Resource$Achievementconfigurations$Update + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Achievementconfigurations$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Achievementconfigurations$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/achievements/{achievementId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', + }, + options + ), + params, + requiredParams: ['achievementId'], + pathParams: ['achievementId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Achievementconfigurations$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the achievement used by this method. + */ + achievementId?: string; + } + export interface Params$Resource$Achievementconfigurations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the achievement used by this method. + */ + achievementId?: string; + } + export interface Params$Resource$Achievementconfigurations$Insert + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The application ID from the Google Play developer console. + */ + applicationId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AchievementConfiguration; + } + export interface Params$Resource$Achievementconfigurations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The application ID from the Google Play developer console. + */ + applicationId?: string; + /** + * The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults. + */ + maxResults?: number; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Achievementconfigurations$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the achievement used by this method. + */ + achievementId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AchievementConfiguration; + } + export interface Params$Resource$Achievementconfigurations$Update + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the achievement used by this method. + */ + achievementId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AchievementConfiguration; + } + + export class Resource$Imageconfigurations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * gamesConfiguration.imageConfigurations.upload + * @desc Uploads an image for a resource with the given ID and image type. + * @alias gamesConfiguration.imageConfigurations.upload + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.imageType Selects which image in a resource for this method. + * @param {string} params.resourceId The ID of the resource used by this method. + * @param {object} params.media Media object + * @param {string} params.media.mimeType Media mime-type + * @param {string|object} params.media.body Media body contents + * @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 + */ + upload( + params?: Params$Resource$Imageconfigurations$Upload, + options?: MethodOptions + ): GaxiosPromise; + upload( + params: Params$Resource$Imageconfigurations$Upload, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + upload( + params: Params$Resource$Imageconfigurations$Upload, + callback: BodyResponseCallback + ): void; + upload(callback: BodyResponseCallback): void; + upload( + paramsOrCallback?: + | Params$Resource$Imageconfigurations$Upload + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Imageconfigurations$Upload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Imageconfigurations$Upload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/games/v1configuration/images/{resourceId}/imageType/{imageType}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + mediaUrl: ( + rootUrl + + '/upload/games/v1configuration/images/{resourceId}/imageType/{imageType}' + ).replace(/([^:]\/)\/+/g, '$1'), + requiredParams: ['resourceId', 'imageType'], + pathParams: ['imageType', 'resourceId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Imageconfigurations$Upload + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Selects which image in a resource for this method. + */ + imageType?: string; + /** + * The ID of the resource used by this method. + */ + resourceId?: string; + + /** + * Media metadata + */ + media?: { + /** + * Media mime-type + */ + mimeType?: string; + + /** + * Media body contents + */ + body?: any; + }; + } + + export class Resource$Leaderboardconfigurations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * gamesConfiguration.leaderboardConfigurations.delete + * @desc Delete the leaderboard configuration with the given ID. + * @alias gamesConfiguration.leaderboardConfigurations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.leaderboardId The ID of the leaderboard. + * @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$Leaderboardconfigurations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Leaderboardconfigurations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Leaderboardconfigurations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Leaderboardconfigurations$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Leaderboardconfigurations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Leaderboardconfigurations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/leaderboards/{leaderboardId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['leaderboardId'], + pathParams: ['leaderboardId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.leaderboardConfigurations.get + * @desc Retrieves the metadata of the leaderboard configuration with the given ID. + * @alias gamesConfiguration.leaderboardConfigurations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.leaderboardId The ID of the leaderboard. + * @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$Leaderboardconfigurations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Leaderboardconfigurations$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Leaderboardconfigurations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Leaderboardconfigurations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Leaderboardconfigurations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Leaderboardconfigurations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/leaderboards/{leaderboardId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['leaderboardId'], + pathParams: ['leaderboardId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.leaderboardConfigurations.insert + * @desc Insert a new leaderboard configuration in this application. + * @alias gamesConfiguration.leaderboardConfigurations.insert + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.applicationId The application ID from the Google Play developer console. + * @param {().LeaderboardConfiguration} params.requestBody 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 + */ + insert( + params?: Params$Resource$Leaderboardconfigurations$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Leaderboardconfigurations$Insert, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Leaderboardconfigurations$Insert, + callback: BodyResponseCallback + ): void; + insert( + callback: BodyResponseCallback + ): void; + insert( + paramsOrCallback?: + | Params$Resource$Leaderboardconfigurations$Insert + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Leaderboardconfigurations$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Leaderboardconfigurations$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/games/v1configuration/applications/{applicationId}/leaderboards' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['applicationId'], + pathParams: ['applicationId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.leaderboardConfigurations.list + * @desc Returns a list of the leaderboard configurations in this application. + * @alias gamesConfiguration.leaderboardConfigurations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.applicationId The application ID from the Google Play developer console. + * @param {integer=} params.maxResults The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults. + * @param {string=} params.pageToken The token returned by the previous 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 + */ + list( + params?: Params$Resource$Leaderboardconfigurations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Leaderboardconfigurations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$LeaderboardConfigurationListResponse + > + ): void; + list( + params: Params$Resource$Leaderboardconfigurations$List, + callback: BodyResponseCallback< + Schema$LeaderboardConfigurationListResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$LeaderboardConfigurationListResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Leaderboardconfigurations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$LeaderboardConfigurationListResponse + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Leaderboardconfigurations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Leaderboardconfigurations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/games/v1configuration/applications/{applicationId}/leaderboards' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['applicationId'], + pathParams: ['applicationId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * gamesConfiguration.leaderboardConfigurations.patch + * @desc Update the metadata of the leaderboard configuration with the given ID. This method supports patch semantics. + * @alias gamesConfiguration.leaderboardConfigurations.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.leaderboardId The ID of the leaderboard. + * @param {().LeaderboardConfiguration} params.requestBody 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$Leaderboardconfigurations$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Leaderboardconfigurations$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Leaderboardconfigurations$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Leaderboardconfigurations$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Leaderboardconfigurations$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Leaderboardconfigurations$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/leaderboards/{leaderboardId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['leaderboardId'], + pathParams: ['leaderboardId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * gamesConfiguration.leaderboardConfigurations.update + * @desc Update the metadata of the leaderboard configuration with the given ID. + * @alias gamesConfiguration.leaderboardConfigurations.update + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.leaderboardId The ID of the leaderboard. + * @param {().LeaderboardConfiguration} params.requestBody 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$Leaderboardconfigurations$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Leaderboardconfigurations$Update, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Leaderboardconfigurations$Update, + callback: BodyResponseCallback + ): void; + update( + callback: BodyResponseCallback + ): void; + update( + paramsOrCallback?: + | Params$Resource$Leaderboardconfigurations$Update + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Leaderboardconfigurations$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Leaderboardconfigurations$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/games/v1configuration/leaderboards/{leaderboardId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', + }, + options + ), + params, + requiredParams: ['leaderboardId'], + pathParams: ['leaderboardId'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Leaderboardconfigurations$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the leaderboard. + */ + leaderboardId?: string; + } + export interface Params$Resource$Leaderboardconfigurations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the leaderboard. + */ + leaderboardId?: string; + } + export interface Params$Resource$Leaderboardconfigurations$Insert + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The application ID from the Google Play developer console. + */ + applicationId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$LeaderboardConfiguration; + } + export interface Params$Resource$Leaderboardconfigurations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The application ID from the Google Play developer console. + */ + applicationId?: string; + /** + * The maximum number of resource configurations to return in the response, used for paging. For any response, the actual number of resources returned may be less than the specified maxResults. + */ + maxResults?: number; + /** + * The token returned by the previous request. + */ + pageToken?: string; + } + export interface Params$Resource$Leaderboardconfigurations$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the leaderboard. + */ + leaderboardId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$LeaderboardConfiguration; + } + export interface Params$Resource$Leaderboardconfigurations$Update + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The ID of the leaderboard. + */ + leaderboardId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$LeaderboardConfiguration; + } +} diff --git a/src/apis/gamesConfiguration/webpack.config.js b/src/apis/gamesConfiguration/webpack.config.js new file mode 100644 index 0000000000..9e89e5b287 --- /dev/null +++ b/src/apis/gamesConfiguration/webpack.config.js @@ -0,0 +1,69 @@ +// Copyright 2019 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. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + }, + output: { + library: 'Gamesconfiguration', + filename: 'gamesConfiguration.min.js', + path: path.resolve(__dirname, 'dist'), + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +}; diff --git a/src/apis/healthcare/v1beta1.ts b/src/apis/healthcare/v1beta1.ts index 2019a47cd0..132ad6b8f5 100644 --- a/src/apis/healthcare/v1beta1.ts +++ b/src/apis/healthcare/v1beta1.ts @@ -947,7 +947,7 @@ export namespace healthcare_v1beta1 { */ export interface Schema$NotificationConfig { /** - * The [Cloud Pub/Sub](https://cloud.google.com/pubsub/docs/) topic that notifications of changes are published on. Supplied by the client. PubsubMessage.Data contains the resource name. PubsubMessage.MessageId is the ID of this message. It is guaranteed to be unique within the topic. PubsubMessage.PublishTime is the time at which the message was published. Notifications are only sent if the topic is non-empty. [Topic names](https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a project. cloud-healthcare@system.gserviceaccount.com must have publisher permissions on the given Cloud Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail. + * The [Cloud Pub/Sub](https://cloud.google.com/pubsub/docs/) topic that notifications of changes are published on. Supplied by the client. PubsubMessage.Data contains the resource name. PubsubMessage.MessageId is the ID of this message. It is guaranteed to be unique within the topic. PubsubMessage.PublishTime is the time at which the message was published. Notifications are only sent if the topic is non-empty. [Topic names](https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a project. cloud-healthcare@system.gserviceaccount.com must have publisher permissions on the given Cloud Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail. If a notification can't be published to Cloud Pub/Sub, errors are logged to Stackdriver (see [Viewing logs](/healthcare/docs/how-tos/stackdriver-logging)). If the number of errors exceeds a certain rate, some aren't submitted. */ pubsubTopic?: string | null; } diff --git a/src/apis/index.ts b/src/apis/index.ts index dcfd5304b3..71904edf99 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -81,6 +81,7 @@ import * as dfareporting from './dfareporting'; import * as dialogflow from './dialogflow'; import * as digitalassetlinks from './digitalassetlinks'; import * as discovery from './discovery'; +import * as displayvideo from './displayvideo'; import * as dlp from './dlp'; import * as dns from './dns'; import * as docs from './docs'; @@ -99,6 +100,7 @@ import * as firebaserules from './firebaserules'; import * as firestore from './firestore'; import * as fitness from './fitness'; import * as games from './games'; +import * as gamesConfiguration from './gamesConfiguration'; import * as gamesManagement from './gamesManagement'; import * as genomics from './genomics'; import * as gmail from './gmail'; @@ -118,10 +120,12 @@ import * as libraryagent from './libraryagent'; import * as licensing from './licensing'; import * as lifesciences from './lifesciences'; import * as logging from './logging'; +import * as managedidentities from './managedidentities'; import * as manufacturers from './manufacturers'; import * as mirror from './mirror'; import * as ml from './ml'; import * as monitoring from './monitoring'; +import * as networkmanagement from './networkmanagement'; import * as oauth2 from './oauth2'; import * as osconfig from './osconfig'; import * as oslogin from './oslogin'; @@ -253,6 +257,7 @@ export const APIS: APIList = { dialogflow: dialogflow.VERSIONS, digitalassetlinks: digitalassetlinks.VERSIONS, discovery: discovery.VERSIONS, + displayvideo: displayvideo.VERSIONS, dlp: dlp.VERSIONS, dns: dns.VERSIONS, docs: docs.VERSIONS, @@ -271,6 +276,7 @@ export const APIS: APIList = { firestore: firestore.VERSIONS, fitness: fitness.VERSIONS, games: games.VERSIONS, + gamesConfiguration: gamesConfiguration.VERSIONS, gamesManagement: gamesManagement.VERSIONS, genomics: genomics.VERSIONS, gmail: gmail.VERSIONS, @@ -290,10 +296,12 @@ export const APIS: APIList = { licensing: licensing.VERSIONS, lifesciences: lifesciences.VERSIONS, logging: logging.VERSIONS, + managedidentities: managedidentities.VERSIONS, manufacturers: manufacturers.VERSIONS, mirror: mirror.VERSIONS, ml: ml.VERSIONS, monitoring: monitoring.VERSIONS, + networkmanagement: networkmanagement.VERSIONS, oauth2: oauth2.VERSIONS, osconfig: osconfig.VERSIONS, oslogin: oslogin.VERSIONS, @@ -423,6 +431,7 @@ export class GeneratedAPIs { dialogflow = dialogflow.dialogflow; digitalassetlinks = digitalassetlinks.digitalassetlinks; discovery = discovery.discovery; + displayvideo = displayvideo.displayvideo; dlp = dlp.dlp; dns = dns.dns; docs = docs.docs; @@ -441,6 +450,7 @@ export class GeneratedAPIs { firestore = firestore.firestore; fitness = fitness.fitness; games = games.games; + gamesConfiguration = gamesConfiguration.gamesConfiguration; gamesManagement = gamesManagement.gamesManagement; genomics = genomics.genomics; gmail = gmail.gmail; @@ -460,10 +470,12 @@ export class GeneratedAPIs { licensing = licensing.licensing; lifesciences = lifesciences.lifesciences; logging = logging.logging; + managedidentities = managedidentities.managedidentities; manufacturers = manufacturers.manufacturers; mirror = mirror.mirror; ml = ml.ml; monitoring = monitoring.monitoring; + networkmanagement = networkmanagement.networkmanagement; oauth2 = oauth2.oauth2; osconfig = osconfig.osconfig; oslogin = oslogin.oslogin; diff --git a/src/apis/logging/v2.ts b/src/apis/logging/v2.ts index 394bd0b605..2c892f4478 100644 --- a/src/apis/logging/v2.ts +++ b/src/apis/logging/v2.ts @@ -87,9 +87,9 @@ export namespace logging_v2 { } /** - * Stackdriver Logging API + * Cloud Logging API * - * Writes log entries and manages your Stackdriver Logging configuration. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the <a href=https://cloud.google.com/logging/docs>Stackdriver Logging documentation</a>. + * Writes log entries and manages your Cloud Logging configuration. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the <a href=https://cloud.google.com/logging/docs>Cloud Logging documentation</a>. * * @example * const {google} = require('googleapis'); @@ -176,11 +176,11 @@ export namespace logging_v2 { */ kmsKeyName?: string | null; /** - * Output Only. The resource name of the CMEK settings. + * Output only. The resource name of the CMEK settings. */ name?: string | null; /** - * Output Only. The service account that will be used by the Logs Router to access your Cloud KMS key.Before enabling CMEK for Logs Router, you must first assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account that the Logs Router will use to access your Cloud KMS key. Use GetCmekSettings to obtain the service account ID.See Enabling CMEK for Logs Router for more information. + * Output only. The service account that will be used by the Logs Router to access your Cloud KMS key.Before enabling CMEK for Logs Router, you must first assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account that the Logs Router will use to access your Cloud KMS key. Use GetCmekSettings to obtain the service account ID.See Enabling CMEK for Logs Router for more information. */ serviceAccountId?: string | null; } @@ -360,7 +360,7 @@ export namespace logging_v2 { */ pageToken?: string | null; /** - * Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". + * Optional. Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". */ projectIds?: string[] | null; /** @@ -446,7 +446,7 @@ export namespace logging_v2 { */ description?: string | null; /** - * The bucket lifecycle state.Output only. + * Output only. The bucket lifecycle state. */ lifecycleState?: string | null; /** @@ -483,11 +483,11 @@ export namespace logging_v2 { */ labels?: {[key: string]: string} | null; /** - * Required. The resource name of the log to which this log entry belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may optionally be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. + * Required. The resource name of the log to which this log entry belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. */ logName?: string | null; /** - * Deprecated. Output only. Additional metadata about the monitored resource.Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated for GKE versions older than 1.12.6. For GKE versions 1.12.6 and above, the metadata field has been deprecated. The Kubernetes pod labels that used to be in metadata.userLabels will now be present in the labels field with a key prefix of k8s-pod/. The Stackdriver system labels that were present in the metadata.systemLabels field will no longer be available in the LogEntry. + * Output only. Deprecated. Additional metadata about the monitored resource.Only k8s_container, k8s_pod, and k8s_node MonitoredResources have this field populated for GKE versions older than 1.12.6. For GKE versions 1.12.6 and above, the metadata field has been deprecated. The Kubernetes pod labels that used to be in metadata.userLabels will now be present in the labels field with a key prefix of k8s-pod/. The Stackdriver system labels that were present in the metadata.systemLabels field will no longer be available in the LogEntry. */ metadata?: Schema$MonitoredResourceMetadata; /** @@ -515,7 +515,7 @@ export namespace logging_v2 { */ sourceLocation?: Schema$LogEntrySourceLocation; /** - * Optional. The span ID within the trace associated with the log entry.For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as <code>"000000000000004a"</code>. + * Optional. The span ID within the trace associated with the log entry.For Trace spans, this is the same format that the Trace API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such as 000000000000004a. */ spanId?: string | null; /** @@ -692,10 +692,6 @@ export namespace logging_v2 { * Optional. If set to True, then this sink is disabled and it does not export any log entries. */ disabled?: boolean | null; - /** - * Do not use. This field is ignored. - */ - endTime?: string | null; /** * Optional. An advanced logs filter. The only exported log entries are those that are in the resource owning the sink and that match the filter. For example: logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR */ @@ -712,10 +708,6 @@ export namespace logging_v2 { * Deprecated. The log entry format to use for this sink's exported log entries. The v2 format is used by default and cannot be changed. */ outputVersionFormat?: string | null; - /** - * Do not use. This field is ignored. - */ - startTime?: string | null; /** * Output only. The last update timestamp of the sink.This field may not be present for older sinks. */ @@ -1030,7 +1022,7 @@ export namespace logging_v2 { */ labels?: {[key: string]: string} | null; /** - * Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example: "projects/my-project-id/logs/syslog" "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" The permission <code>logging.logEntries.create</code> is needed on each project, organization, billing account, or folder that is receiving new log entries, whether the resource is specified in <code>logName</code> or in an individual log entry. + * Optional. A default log resource name that is assigned to all log entries in entries that do not specify a value for log_name: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID] must be URL-encoded. For example: "projects/my-project-id/logs/syslog" "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity" The permission logging.logEntries.create is needed on each project, organization, billing account, or folder that is receiving new log entries, whether the resource is specified in logName or in an individual log entry. */ logName?: string | null; /** @@ -1043,7 +1035,7 @@ export namespace logging_v2 { resource?: Schema$MonitoredResource; } /** - * Result returned from WriteLogEntries. empty + * Result returned from WriteLogEntries. */ export interface Schema$WriteLogEntriesResponse {} @@ -1637,7 +1629,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. * @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 @@ -1794,7 +1786,7 @@ export namespace logging_v2 { */ pageToken?: string; /** - * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. */ parent?: string; } @@ -3747,7 +3739,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. * @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 @@ -3916,7 +3908,7 @@ export namespace logging_v2 { */ pageToken?: string; /** - * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. */ parent?: string; } @@ -4774,7 +4766,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. * @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 @@ -4943,7 +4935,7 @@ export namespace logging_v2 { */ pageToken?: string; /** - * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. */ parent?: string; } @@ -6015,7 +6007,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. * @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 @@ -6184,7 +6176,7 @@ export namespace logging_v2 { */ pageToken?: string; /** - * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. */ parent?: string; } @@ -7515,7 +7507,7 @@ export namespace logging_v2 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * @param {string=} params.pageToken Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * @param {string} params.parent Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. * @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 @@ -7684,7 +7676,7 @@ export namespace logging_v2 { */ pageToken?: string; /** - * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource is required, but supplying the character - in place of LOCATION_ID will return all buckets. + * Required. The parent resource whose buckets are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all buckets. */ parent?: string; } @@ -7905,7 +7897,7 @@ export namespace logging_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.parent The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. + * @param {string} params.parent Required. The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. * @param {().LogMetric} params.requestBody 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. @@ -7980,7 +7972,7 @@ export namespace logging_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {string} params.metricName Required. The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_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 @@ -8049,7 +8041,7 @@ export namespace logging_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * @param {string} params.metricName Required. The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_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 @@ -8198,7 +8190,7 @@ export namespace logging_v2 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.metricName The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. + * @param {string} params.metricName Required. The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. * @param {().LogMetric} params.requestBody 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. @@ -8272,7 +8264,7 @@ export namespace logging_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. + * Required. The resource name of the project in which to create the metric: "projects/[PROJECT_ID]" The new metric must be provided in the request. */ parent?: string; @@ -8289,7 +8281,7 @@ export namespace logging_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * Required. The resource name of the metric to delete: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" */ metricName?: string; } @@ -8301,7 +8293,7 @@ export namespace logging_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * Required. The resource name of the desired metric: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" */ metricName?: string; } @@ -8333,7 +8325,7 @@ export namespace logging_v2 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. + * Required. The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's name field must be the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new metric is created. */ metricName?: string; diff --git a/src/apis/managedidentities/README.md b/src/apis/managedidentities/README.md new file mode 100644 index 0000000000..336d840c7e --- /dev/null +++ b/src/apis/managedidentities/README.md @@ -0,0 +1,47 @@ +Google Inc. logo + +# managedidentities + +> The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD). + +## Installation + +```sh +$ npm install googleapis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). + +## Building a browser bundle + +This library can be used in a browser. To prepare a single file bundle, clone the +[repository](https://github.com/googleapis/google-api-nodejs-client) and run + +```sh +$ cd src/apis/managedidentities +$ npm install +$ npm run webpack +``` + +The generated bundle will be written to `dist/managedidentities.min.js`. Use it from your HTML file: + +```html + + +``` + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE). + +## 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/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/managedidentities/index.ts b/src/apis/managedidentities/index.ts new file mode 100644 index 0000000000..6d3114cd60 --- /dev/null +++ b/src/apis/managedidentities/index.ts @@ -0,0 +1,64 @@ +// Copyright 2019 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 {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {managedidentities_v1} from './v1'; +import {managedidentities_v1alpha1} from './v1alpha1'; +import {managedidentities_v1beta1} from './v1beta1'; + +export const VERSIONS = { + v1: managedidentities_v1.Managedidentities, + v1alpha1: managedidentities_v1alpha1.Managedidentities, + v1beta1: managedidentities_v1beta1.Managedidentities, +}; + +export function managedidentities( + version: 'v1' +): managedidentities_v1.Managedidentities; +export function managedidentities( + options: managedidentities_v1.Options +): managedidentities_v1.Managedidentities; +export function managedidentities( + version: 'v1alpha1' +): managedidentities_v1alpha1.Managedidentities; +export function managedidentities( + options: managedidentities_v1alpha1.Options +): managedidentities_v1alpha1.Managedidentities; +export function managedidentities( + version: 'v1beta1' +): managedidentities_v1beta1.Managedidentities; +export function managedidentities( + options: managedidentities_v1beta1.Options +): managedidentities_v1beta1.Managedidentities; +export function managedidentities< + T = + | managedidentities_v1.Managedidentities + | managedidentities_v1alpha1.Managedidentities + | managedidentities_v1beta1.Managedidentities +>( + this: GoogleConfigurable, + versionOrOptions: + | 'v1' + | managedidentities_v1.Options + | 'v1alpha1' + | managedidentities_v1alpha1.Options + | 'v1beta1' + | managedidentities_v1beta1.Options +) { + return getAPI('managedidentities', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; diff --git a/src/apis/managedidentities/package.json b/src/apis/managedidentities/package.json new file mode 100644 index 0000000000..62714ed608 --- /dev/null +++ b/src/apis/managedidentities/package.json @@ -0,0 +1,43 @@ +{ + "name": "@google/managedidentities", + "version": "0.1.0", + "description": "managedidentities", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^3.0.0" + }, + "devDependencies": { + "gts": "^1.0.0", + "null-loader": "^3.0.0", + "ts-loader": "^6.0.4", + "typedoc": "^0.16.0", + "typescript": "~3.7.0", + "webpack": "^4.35.3", + "webpack-cli": "^3.3.5" + } +} diff --git a/src/apis/managedidentities/tsconfig.json b/src/apis/managedidentities/tsconfig.json new file mode 100644 index 0000000000..e081090496 --- /dev/null +++ b/src/apis/managedidentities/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/managedidentities/v1.ts b/src/apis/managedidentities/v1.ts new file mode 100644 index 0000000000..5e5ce7ba16 --- /dev/null +++ b/src/apis/managedidentities/v1.ts @@ -0,0 +1,2592 @@ +// Copyright 2019 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. + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, +} from 'google-auth-library'; +import { + GoogleConfigurable, + createAPIRequest, + MethodOptions, + GlobalOptions, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {GaxiosPromise} from 'gaxios'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace managedidentities_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + interface StandardParameters { + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Managed Service for Microsoft Active Directory API + * + * The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD). + * + * @example + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1'); + * + * @namespace managedidentities + * @type {Function} + * @version v1 + * @variation v1 + * @param {object=} options Options for Managedidentities + */ + export class Managedidentities { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Request message for AttachTrust + */ + export interface Schema$AttachTrustRequest { + /** + * Required. The domain trust resource. + */ + trust?: Schema$Trust; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. + */ + 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@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * Request message for DetachTrust + */ + export interface Schema$DetachTrustRequest { + /** + * Required. The domain trust resource to removed. + */ + trust?: Schema$Trust; + } + /** + * Represents a managed Microsoft Active Directory domain. + */ + export interface Schema$Domain { + /** + * Optional. The name of delegated administrator account used to perform Active Directory operations. If not specified, `setupadmin` will be used. + */ + admin?: string | null; + /** + * Optional. The full names of the Google Compute Engine [networks](/compute/docs/networks-and-firewalls#networks) the domain instance is connected to. Networks can be added using UpdateDomain. The domain is only available on networks listed in `authorized_networks`. If CIDR subnets overlap between networks, domain creation will fail. + */ + authorizedNetworks?: string[] | null; + /** + * Output only. The time the instance was created. + */ + createTime?: string | null; + /** + * Output only. The fully-qualified domain name of the exposed domain used by clients to connect to the service. Similar to what would be chosen for an Active Directory set up on an internal network. + */ + fqdn?: string | null; + /** + * Optional. Resource labels that can contain user-provided metadata. + */ + labels?: {[key: string]: string} | null; + /** + * Required. Locations where domain needs to be provisioned. regions e.g. us-west1 or us-east4 Service supports up to 4 locations at once. Each location will use a /26 block. + */ + locations?: string[] | null; + /** + * Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + */ + name?: string | null; + /** + * Required. The CIDR range of internal addresses that are reserved for this domain. Reserved networks must be /24 or larger. Ranges must be unique and non-overlapping with existing subnets in [Domain].[authorized_networks]. + */ + reservedIpRange?: string | null; + /** + * Output only. The current state of this domain. + */ + state?: string | null; + /** + * Output only. Additional information about the current status of this domain, if available. + */ + statusMessage?: string | null; + /** + * Output only. The current trusts associated with the domain. + */ + trusts?: Schema$Trust[]; + /** + * Output only. The last update time. + */ + updateTime?: string | null; + } + /** + * 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 {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * 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 | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$GoogleCloudManagedidentitiesV1beta1OpMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + requestedCancellation?: boolean | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$GoogleCloudManagedidentitiesV1OpMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + requestedCancellation?: boolean | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project=snapchat, producer-project=cloud-sql: ```json Instance: { "name": "projects/snapchat/locations/us-east1/instances/prod-instance", "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" }, "state": READY, "software_versions": { "software_update": "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy": "projects/snapchat/locations/us-east1/maintenancePolicies/prod-update-policy", } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": { "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { "resource-type": "compute-instance", "resource-url": "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name": "my-sql-instance1", } ``` + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1Instance { + /** + * consumer_defined_name is the name that is set by the consumer. On the other hand Name field represents system-assigned id of an instance so consumers are not necessarily aware of it. consumer_defined_name is used for notification/UI purposes for consumer to recognize their instances. + */ + consumerDefinedName?: string | null; + /** + * Output only. Timestamp when the resource was created. + */ + createTime?: string | null; + /** + * Optional. Resource labels to represent user provided metadata. Each label is a key-value pair, where both the key and the value are arbitrary strings provided by the user. + */ + labels?: {[key: string]: string} | null; + /** + * The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. + */ + maintenancePolicyNames?: {[key: string]: string} | null; + /** + * The MaintenanceSchedule contains the scheduling information of published maintenance schedule. + */ + maintenanceSchedules?: { + [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule; + } | null; + /** + * Unique name of the resource. It uses the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + */ + name?: string | null; + /** + * Output only. Custom string attributes used primarily to expose producer-specific information in monitoring dashboards. See go/get-instance-metadata. + */ + producerMetadata?: {[key: string]: string} | null; + /** + * Output only. The list of data plane resources provisioned for this instance, e.g. compute VMs. See go/get-instance-metadata. + */ + provisionedResources?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource[]; + /** + * The map between RolloutType and the corresponding RolloutMetadata. This is only mutated by rollout service. For actuation implementation, this information is pass-through for Rollout management. Producer shall not modify by itself. For update of a single entry in this map, the update field mask shall follow this sementics: go/advanced-field-masks + */ + rolloutMetadata?: { + [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata; + } | null; + /** + * Link to the SLM instance template. Only populated when updating SLM instances via SSA's Actuation service adaptor. Service producers with custom control plane (e.g. Cloud SQL) doesn't need to populate this field. Instead they should use software_versions. + */ + slmInstanceTemplate?: string | null; + /** + * Output only. SLO metadata for instance classification in the Standardized dataplane SLO platform. See go/cloud-ssa-standard-slo for feature description. + */ + sloMetadata?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata; + /** + * Software versions that are used to deploy this instance. This can be mutated by rollout services. + */ + softwareVersions?: {[key: string]: string} | null; + /** + * Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use). + */ + state?: string | null; + /** + * Output only. ID of the associated GCP tenant project. See go/get-instance-metadata. + */ + tenantProjectId?: string | null; + /** + * Output only. Timestamp when the resource was last modified. + */ + updateTime?: string | null; + } + /** + * Maintenance schedule which is exposed to customer and potentially end user, indicating published upcoming future maintenance schedule + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule { + /** + * Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false + */ + canReschedule?: boolean | null; + /** + * The scheduled end time for the maintenance. + */ + endTime?: string | null; + /** + * The rollout management policy this maintenance schedule is associated with. When doing reschedule update request, the reschedule should be against this given policy. + */ + rolloutManagementPolicy?: string | null; + /** + * The scheduled start time for the maintenance. + */ + startTime?: string | null; + } + /** + * Node information for custom per-node SLO implementations. SSA does not support per-node SLO, but producers can populate per-node information in SloMetadata for custom precomputations. SSA Eligibility Exporter will emit per-node metric based on this information. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata { + /** + * By default node is eligible if instance is eligible. But individual node might be excluded from SLO by adding entry here. For semantic see SloMetadata.exclusions. If both instance and node level exclusions are present for time period, the node level's reason will be reported by Eligibility Exporter. + */ + exclusions?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion[]; + /** + * The location of the node, if different from instance location. + */ + location?: string | null; + /** + * The id of the node. This should be equal to SaasInstanceNode.node_id. + */ + nodeId?: string | null; + } + /** + * This message has been deprecated. NotificationMetadata is the notification state for an instance. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata { + /** + * Whether the instance update has been rescheduled. + */ + rescheduled?: boolean | null; + /** + * The scheduled end time for the maintenance window during which update can be performed on the instance. + */ + scheduledEndTime?: string | null; + /** + * The scheduled start time for the maintenance window during which update can be performed on the instance. + */ + scheduledStartTime?: string | null; + /** + * The target release to be applied to the instance. + */ + targetRelease?: string | null; + } + /** + * Describes provisioned dataplane resources. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource { + /** + * Type of the resource. This can be either a GCP resource or a custom one (e.g. another cloud provider's VM). For GCP compute resources use singular form of the names listed in GCP compute API documentation (https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed with 'compute-', for example: 'compute-instance', 'compute-disk', 'compute-autoscaler'. + */ + resourceType?: string | null; + /** + * URL identifying the resource, e.g. "https://www.googleapis.com/compute/v1/projects/...)". + */ + resourceUrl?: string | null; + } + /** + * This message has been deprecated. RolloutMetadata for an actuation instance. It maps to a single RolloutType. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata { + /** + * Instance level notification metadata. + */ + notification?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata; + /** + * The last Release that has been applied to the instance. + */ + releaseName?: string | null; + /** + * The last rollout that has been applied to the instance. + */ + rolloutName?: string | null; + } + /** + * SloEligibility is a tuple containing eligibility value: true if an instance is eligible for SLO calculation or false if it should be excluded from all SLO-related calculations along with a user-defined reason. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility { + /** + * Whether an instance is eligible or ineligible. + */ + eligible?: boolean | null; + /** + * User-defined reason for the current value of instance eligibility. Usually, this can be directly mapped to the internal state. An empty reason is allowed. + */ + reason?: string | null; + } + /** + * SloExclusion represents an exclusion in SLI calculation applies to all SLOs. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion { + /** + * Exclusion duration. No restrictions on the possible values. When an ongoing operation is taking longer than initially expected, an existing entry in the exclusion list can be updated by extending the duration. This is supported by the subsystem exporting eligibility data as long as such extension is committed at least 10 minutes before the original exclusion expiration - otherwise it is possible that there will be "gaps" in the exclusion application in the exported timeseries. + */ + duration?: string | null; + /** + * Human-readable reason for the exclusion. This should be a static string (e.g. "Disruptive update in progress") and should not contain dynamically generated data (e.g. instance name). Can be left empty. + */ + reason?: string | null; + /** + * Name of an SLI that this exclusion applies to. Can be left empty, signaling that the instance should be excluded from all SLIs defined in the service SLO configuration. + */ + sliName?: string | null; + /** + * Start time of the exclusion. No alignment (e.g. to a full minute) needed. + */ + startTime?: string | null; + } + /** + * SloMetadata contains resources required for proper SLO classification of the instance. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata { + /** + * Optional. User-defined instance eligibility. + */ + eligibility?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility; + /** + * List of SLO exclusion windows. When multiple entries in the list match (matching the exclusion time-window against current time point) the exclusion reason used in the first matching entry will be published. It is not needed to include expired exclusion in this list, as only the currently applicable exclusions are taken into account by the eligibility exporting subsystem (the historical state of exclusions will be reflected in the historically produced timeseries regardless of the current state). This field can be used to mark the instance as temporary ineligible for the purpose of SLO calculation. For permanent instance SLO exclusion, use of custom instance eligibility is recommended. See 'eligibility' field below. + */ + exclusions?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion[]; + /** + * Optional. List of nodes. Some producers need to use per-node metadata to calculate SLO. This field allows such producers to publish per-node SLO meta data, which will be consumed by SSA Eligibility Exporter and published in the form of per node metric to Monarch. + */ + nodes?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata[]; + /** + * Name of the SLO tier the Instance belongs to. This name will be expected to match the tiers specified in the service SLO configuration. Field is mandatory and must not be empty. + */ + tier?: string | null; + } + /** + * Response message for ListDomains + */ + export interface Schema$ListDomainsResponse { + /** + * A list of Managed Identities Service domains in the project. + */ + domains?: Schema$Domain[]; + /** + * A token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + /** + * A list of locations that could not be reached. + */ + unreachable?: string[] | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * 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 | null; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 be a resource name ending with `operations/{unique_id}`. + */ + name?: string | null; + /** + * 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * [Output only] API version used to start the operation. + */ + apiVersion?: string | null; + /** + * [Output only] Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + cancelRequested?: boolean | null; + /** + * [Output only] The time the operation was created. + */ + createTime?: string | null; + /** + * [Output only] The time the operation finished running. + */ + endTime?: string | null; + /** + * [Output only] Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * [Output only] Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * [Output only] Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: 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. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. + */ + version?: number | null; + } + /** + * Request message for ReconfigureTrust + */ + export interface Schema$ReconfigureTrustRequest { + /** + * Required. The target DNS server IP addresses to resolve the remote domain involved in the trust. + */ + targetDnsIpAddresses?: string[] | null; + /** + * Required. The fully-qualified target domain name which will be in trust with current domain. + */ + targetDomainName?: string | null; + } + /** + * Request message for ResetAdminPassword + */ + export interface Schema$ResetAdminPasswordRequest {} + /** + * Response message for ResetAdminPassword + */ + export interface Schema$ResetAdminPasswordResponse { + /** + * A random password. See admin for more information. + */ + password?: string | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + } + /** + * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * Represents a relationship between two domains. This allows a controller in one domain to authenticate a user in another domain. + */ + export interface Schema$Trust { + /** + * Output only. The time the instance was created. + */ + createTime?: string | null; + /** + * Output only. The last heartbeat time when the trust was known to be connected. + */ + lastTrustHeartbeatTime?: string | null; + /** + * Optional. The trust authentication type, which decides whether the trusted side has forest/domain wide access or selective access to an approved set of resources. + */ + selectiveAuthentication?: boolean | null; + /** + * Output only. The current state of the trust. + */ + state?: string | null; + /** + * Output only. Additional information about the current state of the trust, if available. + */ + stateDescription?: string | null; + /** + * Required. The target DNS server IP addresses which can resolve the remote domain involved in the trust. + */ + targetDnsIpAddresses?: string[] | null; + /** + * Required. The fully qualified target domain name which will be in trust with the current domain. + */ + targetDomainName?: string | null; + /** + * Required. The trust direction, which decides if the current domain is trusted, trusting, or both. + */ + trustDirection?: string | null; + /** + * Required. The trust secret used for the handshake with the target domain. This will not be stored. + */ + trustHandshakeSecret?: string | null; + /** + * Required. The type of trust represented by the trust resource. + */ + trustType?: string | null; + /** + * Output only. The last update time. + */ + updateTime?: string | null; + } + /** + * Request message for ValidateTrust + */ + export interface Schema$ValidateTrustRequest { + /** + * Required. The domain trust to validate trust state for. + */ + trust?: Schema$Trust; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + global: Resource$Projects$Locations$Global; + constructor(context: APIRequestContext) { + this.context = context; + this.global = new Resource$Projects$Locations$Global(this.context); + } + + /** + * managedidentities.projects.locations.get + * @desc Gets information about a location. + * @alias managedidentities.projects.locations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Resource name for the location. + * @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$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.list + * @desc Lists information about the supported locations for this service. + * @alias managedidentities.projects.locations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {boolean=} params.includeUnrevealedLocations If true, the returned list will include locations which are not yet revealed. + * @param {string} params.name The resource that owns the locations collection, if applicable. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * If true, the returned list will include locations which are not yet revealed. + */ + includeUnrevealedLocations?: boolean; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Global { + context: APIRequestContext; + domains: Resource$Projects$Locations$Global$Domains; + operations: Resource$Projects$Locations$Global$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.domains = new Resource$Projects$Locations$Global$Domains( + this.context + ); + this.operations = new Resource$Projects$Locations$Global$Operations( + this.context + ); + } + } + + export class Resource$Projects$Locations$Global$Domains { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * managedidentities.projects.locations.global.domains.attachTrust + * @desc Adds an AD trust to a domain. + * @alias managedidentities.projects.locations.global.domains.attachTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().AttachTrustRequest} params.requestBody 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 + */ + attachTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + options?: MethodOptions + ): GaxiosPromise; + attachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + attachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + callback: BodyResponseCallback + ): void; + attachTrust(callback: BodyResponseCallback): void; + attachTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Attachtrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Attachtrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Attachtrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:attachTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.create + * @desc Creates a Microsoft AD domain. + * @alias managedidentities.projects.locations.global.domains.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.domainName Required. The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. + * @param {string} params.parent Required. The resource project name and location using the form: `projects/{project_id}/locations/global` + * @param {().Domain} params.requestBody 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$Locations$Global$Domains$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Global$Domains$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Global$Domains$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/domains').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.delete + * @desc Deletes a domain. + * @alias managedidentities.projects.locations.global.domains.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_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 + */ + delete( + params?: Params$Resource$Projects$Locations$Global$Domains$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Domains$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Domains$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.detachTrust + * @desc Removes an AD trust. + * @alias managedidentities.projects.locations.global.domains.detachTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().DetachTrustRequest} params.requestBody 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 + */ + detachTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + options?: MethodOptions + ): GaxiosPromise; + detachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + callback: BodyResponseCallback + ): void; + detachTrust(callback: BodyResponseCallback): void; + detachTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Detachtrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Detachtrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Detachtrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:detachTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.get + * @desc Gets information about a domain. + * @alias managedidentities.projects.locations.global.domains.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_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 + */ + get( + params?: Params$Resource$Projects$Locations$Global$Domains$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Domains$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Domains$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @alias managedidentities.projects.locations.global.domains.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.options.requestedPolicyVersion Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Getiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.list + * @desc Lists domains in a project. + * @alias managedidentities.projects.locations.global.domains.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter Optional. A filter specifying constraints of a list operation. For example, `Domain.fqdn="mydomain.myorginization"`. + * @param {string=} params.orderBy Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information. + * @param {integer=} params.pageSize Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used. Regardless of the page_size value, the response may include a partial list. Callers should rely on a response's next_page_token to determine if there are additional results to list. + * @param {string=} params.pageToken Optional. The `next_page_token` value returned from a previous ListDomainsRequest request, if any. + * @param {string} params.parent Required. The resource name of the domain location using the form: `projects/{project_id}/locations/global` + * @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$Locations$Global$Domains$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Domains$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Domains$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/domains').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.patch + * @desc Updates the metadata and configuration of a domain. + * @alias managedidentities.projects.locations.global.domains.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + * @param {string=} params.updateMask Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include fields from Domain: * `labels` * `locations` * `authorized_networks` + * @param {().Domain} params.requestBody 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$Locations$Global$Domains$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Global$Domains$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Global$Domains$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.reconfigureTrust + * @desc Updates the DNS conditional forwarder. + * @alias managedidentities.projects.locations.global.domains.reconfigureTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ReconfigureTrustRequest} params.requestBody 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 + */ + reconfigureTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + options?: MethodOptions + ): GaxiosPromise; + reconfigureTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reconfigureTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + callback: BodyResponseCallback + ): void; + reconfigureTrust(callback: BodyResponseCallback): void; + reconfigureTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:reconfigureTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.resetAdminPassword + * @desc Resets a domain's administrator password. + * @alias managedidentities.projects.locations.global.domains.resetAdminPassword + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ResetAdminPasswordRequest} params.requestBody 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 + */ + resetAdminPassword( + params?: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + options?: MethodOptions + ): GaxiosPromise; + resetAdminPassword( + params: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resetAdminPassword( + params: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + callback: BodyResponseCallback + ): void; + resetAdminPassword( + callback: BodyResponseCallback + ): void; + resetAdminPassword( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:resetAdminPassword').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + * @alias managedidentities.projects.locations.global.domains.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.requestBody 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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Setiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @alias managedidentities.projects.locations.global.domains.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.requestBody 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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Testiampermissions + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.validateTrust + * @desc Validates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests. + * @alias managedidentities.projects.locations.global.domains.validateTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ValidateTrustRequest} params.requestBody 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 + */ + validateTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + options?: MethodOptions + ): GaxiosPromise; + validateTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + validateTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + callback: BodyResponseCallback + ): void; + validateTrust(callback: BodyResponseCallback): void; + validateTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Validatetrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Validatetrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Validatetrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:validateTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Domains$Attachtrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AttachTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. + */ + domainName?: string; + /** + * Required. The resource project name and location using the form: `projects/{project_id}/locations/global` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Detachtrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DetachTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Getiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. A filter specifying constraints of a list operation. For example, `Domain.fqdn="mydomain.myorginization"`. + */ + filter?: string; + /** + * Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information. + */ + orderBy?: string; + /** + * Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used. Regardless of the page_size value, the response may include a partial list. Callers should rely on a response's next_page_token to determine if there are additional results to list. + */ + pageSize?: number; + /** + * Optional. The `next_page_token` value returned from a previous ListDomainsRequest request, if any. + */ + pageToken?: string; + /** + * Required. The resource name of the domain location using the form: `projects/{project_id}/locations/global` + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + */ + name?: string; + /** + * Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include fields from Domain: * `labels` * `locations` * `authorized_networks` + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ReconfigureTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ResetAdminPasswordRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Setiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Testiampermissions + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Validatetrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ValidateTrustRequest; + } + + export class Resource$Projects$Locations$Global$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * managedidentities.projects.locations.global.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * @alias managedidentities.projects.locations.global.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @param {().CancelOperationRequest} params.requestBody 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$Locations$Global$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Cancel + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.operations.delete + * @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + * @alias managedidentities.projects.locations.global.operations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be deleted. + * @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$Locations$Global$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.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 managedidentities.projects.locations.global.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$Locations$Global$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.operations.list + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @alias managedidentities.projects.locations.global.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$Global$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Operations$Cancel + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/managedidentities/v1alpha1.ts b/src/apis/managedidentities/v1alpha1.ts new file mode 100644 index 0000000000..6b405adc98 --- /dev/null +++ b/src/apis/managedidentities/v1alpha1.ts @@ -0,0 +1,2570 @@ +// Copyright 2019 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. + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, +} from 'google-auth-library'; +import { + GoogleConfigurable, + createAPIRequest, + MethodOptions, + GlobalOptions, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {GaxiosPromise} from 'gaxios'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace managedidentities_v1alpha1 { + export interface Options extends GlobalOptions { + version: 'v1alpha1'; + } + + interface StandardParameters { + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Managed Service for Microsoft Active Directory API + * + * The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD). + * + * @example + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1alpha1'); + * + * @namespace managedidentities + * @type {Function} + * @version v1alpha1 + * @variation v1alpha1 + * @param {object=} options Options for Managedidentities + */ + export class Managedidentities { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + export interface Schema$AttachTrustRequest { + /** + * The domain trust resource. + */ + trust?: Schema$Trust; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. + */ + 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@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + export interface Schema$DetachTrustRequest { + /** + * The domain trust resource to removed. + */ + trust?: Schema$Trust; + } + export interface Schema$Domain { + /** + * Optional. The full names of the Google Compute Engine [networks](/compute/docs/networks-and-firewalls#networks) to which the instance is connected. Network can be added using UpdateDomain later. Domain is only available on network part of authorized_networks. Caller needs to make sure that CIDR subnets do not overlap between networks, else domain creation will fail. + */ + authorizedNetworks?: string[] | null; + /** + * Output only. The time the instance was created. Synthetic field is populated automatically by CCFE. go/ccfe-synthetic-field-user-guide + */ + createTime?: string | null; + /** + * Output only. Fully-qualified domain name of the exposed domain used by clients to connect to the service. Similar to what would be chosen for an Active Directory that is set up on an internal network. + */ + fqdn?: string | null; + /** + * Optional. Resource labels to represent user provided metadata + */ + labels?: {[key: string]: string} | null; + /** + * Required. Locations where domain needs to be provisioned. regions e.g. us-west1 or us-east4 Service supports up to 4 locations at once. Each location will use a /26 block. + */ + locations?: string[] | null; + /** + * Optional. Name of customer-visible admin used to perform Active Directory operations. If not specified `setupadmin` would be used. + */ + managedIdentitiesAdminName?: string | null; + /** + * Output only. Unique name of the domain in this scope including projects and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + */ + name?: string | null; + /** + * Required. The CIDR range of internal addresses that are reserved for this domain. Reserved networks must be /24 or larger. Ranges must be unique and non-overlapping with existing subnets in [Domain].[authorized_networks]. + */ + reservedIpRange?: string | null; + /** + * Output only. The current state of this domain. + */ + state?: string | null; + /** + * Output only. Additional information about the current status of this domain, if available. + */ + statusMessage?: string | null; + /** + * Output only. The current trusts associated with the domain. + */ + trusts?: Schema$Trust[]; + /** + * Output only. Last update time. Synthetic field is populated automatically by CCFE. + */ + updateTime?: string | null; + } + /** + * 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 {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * 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 | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$GoogleCloudManagedidentitiesV1beta1OpMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + requestedCancellation?: boolean | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$GoogleCloudManagedidentitiesV1OpMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + requestedCancellation?: boolean | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project=snapchat, producer-project=cloud-sql: ```json Instance: { "name": "projects/snapchat/locations/us-east1/instances/prod-instance", "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" }, "state": READY, "software_versions": { "software_update": "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy": "projects/snapchat/locations/us-east1/maintenancePolicies/prod-update-policy", } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": { "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { "resource-type": "compute-instance", "resource-url": "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name": "my-sql-instance1", } ``` + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1Instance { + /** + * consumer_defined_name is the name that is set by the consumer. On the other hand Name field represents system-assigned id of an instance so consumers are not necessarily aware of it. consumer_defined_name is used for notification/UI purposes for consumer to recognize their instances. + */ + consumerDefinedName?: string | null; + /** + * Output only. Timestamp when the resource was created. + */ + createTime?: string | null; + /** + * Optional. Resource labels to represent user provided metadata. Each label is a key-value pair, where both the key and the value are arbitrary strings provided by the user. + */ + labels?: {[key: string]: string} | null; + /** + * The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. + */ + maintenancePolicyNames?: {[key: string]: string} | null; + /** + * The MaintenanceSchedule contains the scheduling information of published maintenance schedule. + */ + maintenanceSchedules?: { + [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule; + } | null; + /** + * Unique name of the resource. It uses the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + */ + name?: string | null; + /** + * Output only. Custom string attributes used primarily to expose producer-specific information in monitoring dashboards. See go/get-instance-metadata. + */ + producerMetadata?: {[key: string]: string} | null; + /** + * Output only. The list of data plane resources provisioned for this instance, e.g. compute VMs. See go/get-instance-metadata. + */ + provisionedResources?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource[]; + /** + * The map between RolloutType and the corresponding RolloutMetadata. This is only mutated by rollout service. For actuation implementation, this information is pass-through for Rollout management. Producer shall not modify by itself. For update of a single entry in this map, the update field mask shall follow this sementics: go/advanced-field-masks + */ + rolloutMetadata?: { + [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata; + } | null; + /** + * Link to the SLM instance template. Only populated when updating SLM instances via SSA's Actuation service adaptor. Service producers with custom control plane (e.g. Cloud SQL) doesn't need to populate this field. Instead they should use software_versions. + */ + slmInstanceTemplate?: string | null; + /** + * Output only. SLO metadata for instance classification in the Standardized dataplane SLO platform. See go/cloud-ssa-standard-slo for feature description. + */ + sloMetadata?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata; + /** + * Software versions that are used to deploy this instance. This can be mutated by rollout services. + */ + softwareVersions?: {[key: string]: string} | null; + /** + * Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use). + */ + state?: string | null; + /** + * Output only. ID of the associated GCP tenant project. See go/get-instance-metadata. + */ + tenantProjectId?: string | null; + /** + * Output only. Timestamp when the resource was last modified. + */ + updateTime?: string | null; + } + /** + * Maintenance schedule which is exposed to customer and potentially end user, indicating published upcoming future maintenance schedule + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule { + /** + * Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false + */ + canReschedule?: boolean | null; + /** + * The scheduled end time for the maintenance. + */ + endTime?: string | null; + /** + * The rollout management policy this maintenance schedule is associated with. When doing reschedule update request, the reschedule should be against this given policy. + */ + rolloutManagementPolicy?: string | null; + /** + * The scheduled start time for the maintenance. + */ + startTime?: string | null; + } + /** + * Node information for custom per-node SLO implementations. SSA does not support per-node SLO, but producers can populate per-node information in SloMetadata for custom precomputations. SSA Eligibility Exporter will emit per-node metric based on this information. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata { + /** + * By default node is eligible if instance is eligible. But individual node might be excluded from SLO by adding entry here. For semantic see SloMetadata.exclusions. If both instance and node level exclusions are present for time period, the node level's reason will be reported by Eligibility Exporter. + */ + exclusions?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion[]; + /** + * The location of the node, if different from instance location. + */ + location?: string | null; + /** + * The id of the node. This should be equal to SaasInstanceNode.node_id. + */ + nodeId?: string | null; + } + /** + * This message has been deprecated. NotificationMetadata is the notification state for an instance. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata { + /** + * Whether the instance update has been rescheduled. + */ + rescheduled?: boolean | null; + /** + * The scheduled end time for the maintenance window during which update can be performed on the instance. + */ + scheduledEndTime?: string | null; + /** + * The scheduled start time for the maintenance window during which update can be performed on the instance. + */ + scheduledStartTime?: string | null; + /** + * The target release to be applied to the instance. + */ + targetRelease?: string | null; + } + /** + * Describes provisioned dataplane resources. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource { + /** + * Type of the resource. This can be either a GCP resource or a custom one (e.g. another cloud provider's VM). For GCP compute resources use singular form of the names listed in GCP compute API documentation (https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed with 'compute-', for example: 'compute-instance', 'compute-disk', 'compute-autoscaler'. + */ + resourceType?: string | null; + /** + * URL identifying the resource, e.g. "https://www.googleapis.com/compute/v1/projects/...)". + */ + resourceUrl?: string | null; + } + /** + * This message has been deprecated. RolloutMetadata for an actuation instance. It maps to a single RolloutType. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata { + /** + * Instance level notification metadata. + */ + notification?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata; + /** + * The last Release that has been applied to the instance. + */ + releaseName?: string | null; + /** + * The last rollout that has been applied to the instance. + */ + rolloutName?: string | null; + } + /** + * SloEligibility is a tuple containing eligibility value: true if an instance is eligible for SLO calculation or false if it should be excluded from all SLO-related calculations along with a user-defined reason. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility { + /** + * Whether an instance is eligible or ineligible. + */ + eligible?: boolean | null; + /** + * User-defined reason for the current value of instance eligibility. Usually, this can be directly mapped to the internal state. An empty reason is allowed. + */ + reason?: string | null; + } + /** + * SloExclusion represents an exclusion in SLI calculation applies to all SLOs. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion { + /** + * Exclusion duration. No restrictions on the possible values. When an ongoing operation is taking longer than initially expected, an existing entry in the exclusion list can be updated by extending the duration. This is supported by the subsystem exporting eligibility data as long as such extension is committed at least 10 minutes before the original exclusion expiration - otherwise it is possible that there will be "gaps" in the exclusion application in the exported timeseries. + */ + duration?: string | null; + /** + * Human-readable reason for the exclusion. This should be a static string (e.g. "Disruptive update in progress") and should not contain dynamically generated data (e.g. instance name). Can be left empty. + */ + reason?: string | null; + /** + * Name of an SLI that this exclusion applies to. Can be left empty, signaling that the instance should be excluded from all SLIs defined in the service SLO configuration. + */ + sliName?: string | null; + /** + * Start time of the exclusion. No alignment (e.g. to a full minute) needed. + */ + startTime?: string | null; + } + /** + * SloMetadata contains resources required for proper SLO classification of the instance. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata { + /** + * Optional. User-defined instance eligibility. + */ + eligibility?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility; + /** + * List of SLO exclusion windows. When multiple entries in the list match (matching the exclusion time-window against current time point) the exclusion reason used in the first matching entry will be published. It is not needed to include expired exclusion in this list, as only the currently applicable exclusions are taken into account by the eligibility exporting subsystem (the historical state of exclusions will be reflected in the historically produced timeseries regardless of the current state). This field can be used to mark the instance as temporary ineligible for the purpose of SLO calculation. For permanent instance SLO exclusion, use of custom instance eligibility is recommended. See 'eligibility' field below. + */ + exclusions?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion[]; + /** + * Optional. List of nodes. Some producers need to use per-node metadata to calculate SLO. This field allows such producers to publish per-node SLO meta data, which will be consumed by SSA Eligibility Exporter and published in the form of per node metric to Monarch. + */ + nodes?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata[]; + /** + * Name of the SLO tier the Instance belongs to. This name will be expected to match the tiers specified in the service SLO configuration. Field is mandatory and must not be empty. + */ + tier?: string | null; + } + export interface Schema$ListDomainsResponse { + /** + * A list of Managed Identities Service domains in the project. + */ + domains?: Schema$Domain[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + /** + * Locations that could not be reached. + */ + unreachable?: string[] | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * 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 | null; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 be a resource name ending with `operations/{unique_id}`. + */ + name?: string | null; + /** + * 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * [Output only] API version used to start the operation. + */ + apiVersion?: string | null; + /** + * [Output only] Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + cancelRequested?: boolean | null; + /** + * [Output only] The time the operation was created. + */ + createTime?: string | null; + /** + * [Output only] The time the operation finished running. + */ + endTime?: string | null; + /** + * [Output only] Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * [Output only] Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * [Output only] Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: 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. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. + */ + version?: number | null; + } + export interface Schema$ReconfigureTrustRequest { + /** + * The domain trust resource with updated dns conditional forwarder. + */ + trust?: Schema$Trust; + } + export interface Schema$ResetAdminPasswordRequest {} + export interface Schema$ResetAdminPasswordResponse { + /** + * A random password. See admin for more information. + */ + password?: string | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + } + /** + * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * Represents a relationship between two domains which makes it possible for users in one domain to be authenticated by a dc in another domain. Refer https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc731335(v%3dws.10) + */ + export interface Schema$Trust { + /** + * Output only. The time the instance was created. + */ + createTime?: string | null; + /** + * Output only. The last heartbeat time when the trust was known to be connected. + */ + lastKnownTrustConnectedHeartbeatTime?: string | null; + /** + * The trust authentication type which decides whether the trusted side has forest/domain wide access or selective access to approved set of resources. + */ + selectiveAuthentication?: boolean | null; + /** + * Output only. The current state of this trust. + */ + state?: string | null; + /** + * Output only. Additional information about the current state of this trust, if available. + */ + stateDescription?: string | null; + /** + * The target dns server ip addresses which can resolve the remote domain involved in trust. + */ + targetDnsIpAddresses?: string[] | null; + /** + * The fully qualified target domain name which will be in trust with current domain. + */ + targetDomainName?: string | null; + /** + * The trust direction decides the current domain is trusted, trusting or both. + */ + trustDirection?: string | null; + /** + * Input only, and will not be stored. The trust secret used for handshake with target domain. + */ + trustHandshakeSecret?: string | null; + /** + * The type of trust represented by the trust resource. + */ + trustType?: string | null; + /** + * Output only. Last update time. + */ + updateTime?: string | null; + } + export interface Schema$ValidateTrustRequest { + /** + * The domain trust to validate trust state for. + */ + trust?: Schema$Trust; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + global: Resource$Projects$Locations$Global; + constructor(context: APIRequestContext) { + this.context = context; + this.global = new Resource$Projects$Locations$Global(this.context); + } + + /** + * managedidentities.projects.locations.get + * @desc Gets information about a location. + * @alias managedidentities.projects.locations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Resource name for the location. + * @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$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.list + * @desc Lists information about the supported locations for this service. + * @alias managedidentities.projects.locations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {boolean=} params.includeUnrevealedLocations If true, the returned list will include locations which are not yet revealed. + * @param {string} params.name The resource that owns the locations collection, if applicable. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * If true, the returned list will include locations which are not yet revealed. + */ + includeUnrevealedLocations?: boolean; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Global { + context: APIRequestContext; + domains: Resource$Projects$Locations$Global$Domains; + operations: Resource$Projects$Locations$Global$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.domains = new Resource$Projects$Locations$Global$Domains( + this.context + ); + this.operations = new Resource$Projects$Locations$Global$Operations( + this.context + ); + } + } + + export class Resource$Projects$Locations$Global$Domains { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * managedidentities.projects.locations.global.domains.attachTrust + * @desc Adds AD trust in a given domain. Operation + * @alias managedidentities.projects.locations.global.domains.attachTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().AttachTrustRequest} params.requestBody 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 + */ + attachTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + options?: MethodOptions + ): GaxiosPromise; + attachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + attachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + callback: BodyResponseCallback + ): void; + attachTrust(callback: BodyResponseCallback): void; + attachTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Attachtrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Attachtrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Attachtrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}:attachTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.create + * @desc Creates a Microsoft AD Domain in a given project. Operation + * @alias managedidentities.projects.locations.global.domains.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.domainName The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. + * @param {string} params.parent Resource project name and location using the form: `projects/{project_id}/locations/global` + * @param {().Domain} params.requestBody 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$Locations$Global$Domains$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Global$Domains$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Global$Domains$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/domains').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.delete + * @desc Deletes identified domain. Operation + * @alias managedidentities.projects.locations.global.domains.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_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 + */ + delete( + params?: Params$Resource$Projects$Locations$Global$Domains$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Domains$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Domains$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.detachTrust + * @desc Removes identified trust. Operation + * @alias managedidentities.projects.locations.global.domains.detachTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().DetachTrustRequest} params.requestBody 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 + */ + detachTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + options?: MethodOptions + ): GaxiosPromise; + detachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + callback: BodyResponseCallback + ): void; + detachTrust(callback: BodyResponseCallback): void; + detachTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Detachtrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Detachtrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Detachtrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}:detachTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.get + * @desc Gets details of a single Domain. + * @alias managedidentities.projects.locations.global.domains.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_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 + */ + get( + params?: Params$Resource$Projects$Locations$Global$Domains$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Domains$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Domains$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @alias managedidentities.projects.locations.global.domains.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.options.requestedPolicyVersion Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Getiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.list + * @desc Lists Domains in a given project. + * @alias managedidentities.projects.locations.global.domains.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter Optional. Filter specifying constraints of a list operation. For example, `Domain.fqdn="mydomain.myorginization"`. + * @param {string=} params.orderBy Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order. + * @param {integer=} params.pageSize If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried. + * @param {string=} params.pageToken The next_page_token value returned from a previous List request, if any. + * @param {string} params.parent Required. The resource name of the domain location using the form: `projects/{project_id}/locations/global` + * @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$Locations$Global$Domains$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Domains$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Domains$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+parent}/domains').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.patch + * @desc Updates the metadata and configuration of a specified domain. Operation + * @alias managedidentities.projects.locations.global.domains.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Output only. Unique name of the domain in this scope including projects and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + * @param {string=} params.updateMask Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Domain: * `labels` * `locations` * `authorized_networks` + * @param {().Domain} params.requestBody 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$Locations$Global$Domains$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Global$Domains$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Global$Domains$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.reconfigureTrust + * @desc Updates the dns conditional forwarder. Operation + * @alias managedidentities.projects.locations.global.domains.reconfigureTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ReconfigureTrustRequest} params.requestBody 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 + */ + reconfigureTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + options?: MethodOptions + ): GaxiosPromise; + reconfigureTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reconfigureTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + callback: BodyResponseCallback + ): void; + reconfigureTrust(callback: BodyResponseCallback): void; + reconfigureTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}:reconfigureTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.resetAdminPassword + * @desc Resets managed identities admin password identified by managed_identities_admin_name + * @alias managedidentities.projects.locations.global.domains.resetAdminPassword + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ResetAdminPasswordRequest} params.requestBody 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 + */ + resetAdminPassword( + params?: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + options?: MethodOptions + ): GaxiosPromise; + resetAdminPassword( + params: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resetAdminPassword( + params: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + callback: BodyResponseCallback + ): void; + resetAdminPassword( + callback: BodyResponseCallback + ): void; + resetAdminPassword( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}:resetAdminPassword').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + * @alias managedidentities.projects.locations.global.domains.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.requestBody 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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Setiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @alias managedidentities.projects.locations.global.domains.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.requestBody 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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Testiampermissions + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.validateTrust + * @desc Validate the trust state Operation + * @alias managedidentities.projects.locations.global.domains.validateTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ValidateTrustRequest} params.requestBody 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 + */ + validateTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + options?: MethodOptions + ): GaxiosPromise; + validateTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + validateTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + callback: BodyResponseCallback + ): void; + validateTrust(callback: BodyResponseCallback): void; + validateTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Validatetrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Validatetrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Validatetrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}:validateTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Domains$Attachtrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AttachTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. + */ + domainName?: string; + /** + * Resource project name and location using the form: `projects/{project_id}/locations/global` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Detachtrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DetachTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Getiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. Filter specifying constraints of a list operation. For example, `Domain.fqdn="mydomain.myorginization"`. + */ + filter?: string; + /** + * Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order. + */ + orderBy?: string; + /** + * If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous List request, if any. + */ + pageToken?: string; + /** + * Required. The resource name of the domain location using the form: `projects/{project_id}/locations/global` + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Output only. Unique name of the domain in this scope including projects and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + */ + name?: string; + /** + * Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Domain: * `labels` * `locations` * `authorized_networks` + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ReconfigureTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ResetAdminPasswordRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Setiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Testiampermissions + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Validatetrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ValidateTrustRequest; + } + + export class Resource$Projects$Locations$Global$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * managedidentities.projects.locations.global.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * @alias managedidentities.projects.locations.global.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @param {().CancelOperationRequest} params.requestBody 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$Locations$Global$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Cancel + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.operations.delete + * @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + * @alias managedidentities.projects.locations.global.operations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be deleted. + * @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$Locations$Global$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.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 managedidentities.projects.locations.global.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$Locations$Global$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.operations.list + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @alias managedidentities.projects.locations.global.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$Global$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Operations$Cancel + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/managedidentities/v1beta1.ts b/src/apis/managedidentities/v1beta1.ts new file mode 100644 index 0000000000..437664a7be --- /dev/null +++ b/src/apis/managedidentities/v1beta1.ts @@ -0,0 +1,2595 @@ +// Copyright 2019 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. + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, +} from 'google-auth-library'; +import { + GoogleConfigurable, + createAPIRequest, + MethodOptions, + GlobalOptions, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {GaxiosPromise} from 'gaxios'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace managedidentities_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + interface StandardParameters { + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Managed Service for Microsoft Active Directory API + * + * The Managed Service for Microsoft Active Directory API is used for managing a highly available, hardened service running Microsoft Active Directory (AD). + * + * @example + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1beta1'); + * + * @namespace managedidentities + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for Managedidentities + */ + export class Managedidentities { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Request message for AttachTrust + */ + export interface Schema$AttachTrustRequest { + /** + * Required. The domain trust resource. + */ + trust?: Schema$Trust; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. + */ + 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@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * Request message for DetachTrust + */ + export interface Schema$DetachTrustRequest { + /** + * Required. The domain trust resource to removed. + */ + trust?: Schema$Trust; + } + /** + * Represents a managed Microsoft Active Directory domain. + */ + export interface Schema$Domain { + /** + * Optional. The name of delegated administrator account used to perform Active Directory operations. If not specified, `setupadmin` will be used. + */ + admin?: string | null; + /** + * Optional. The full names of the Google Compute Engine [networks](/compute/docs/networks-and-firewalls#networks) the domain instance is connected to. Networks can be added using UpdateDomain. The domain is only available on networks listed in `authorized_networks`. If CIDR subnets overlap between networks, domain creation will fail. + */ + authorizedNetworks?: string[] | null; + /** + * Output only. The time the instance was created. + */ + createTime?: string | null; + /** + * Output only. The fully-qualified domain name of the exposed domain used by clients to connect to the service. Similar to what would be chosen for an Active Directory set up on an internal network. + */ + fqdn?: string | null; + /** + * Optional. Resource labels that can contain user-provided metadata. + */ + labels?: {[key: string]: string} | null; + /** + * Required. Locations where domain needs to be provisioned. regions e.g. us-west1 or us-east4 Service supports up to 4 locations at once. Each location will use a /26 block. + */ + locations?: string[] | null; + /** + * Output only. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + */ + name?: string | null; + /** + * Required. The CIDR range of internal addresses that are reserved for this domain. Reserved networks must be /24 or larger. Ranges must be unique and non-overlapping with existing subnets in [Domain].[authorized_networks]. + */ + reservedIpRange?: string | null; + /** + * Output only. The current state of this domain. + */ + state?: string | null; + /** + * Output only. Additional information about the current status of this domain, if available. + */ + statusMessage?: string | null; + /** + * Output only. The current trusts associated with the domain. + */ + trusts?: Schema$Trust[]; + /** + * Output only. The last update time. + */ + updateTime?: string | null; + } + /** + * 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 {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * 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 | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$GoogleCloudManagedidentitiesV1beta1OpMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + requestedCancellation?: boolean | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$GoogleCloudManagedidentitiesV1OpMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + requestedCancellation?: boolean | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project=snapchat, producer-project=cloud-sql: ```json Instance: { "name": "projects/snapchat/locations/us-east1/instances/prod-instance", "create_time": { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" }, "state": READY, "software_versions": { "software_update": "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy": "projects/snapchat/locations/us-east1/maintenancePolicies/prod-update-policy", } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": { "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", }, "provisioned_resources": [ { "resource-type": "compute-instance", "resource-url": "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/instances/vm-1", } ], "maintenance_schedules": { "csa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431, }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name": "my-sql-instance1", } ``` + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1Instance { + /** + * consumer_defined_name is the name that is set by the consumer. On the other hand Name field represents system-assigned id of an instance so consumers are not necessarily aware of it. consumer_defined_name is used for notification/UI purposes for consumer to recognize their instances. + */ + consumerDefinedName?: string | null; + /** + * Output only. Timestamp when the resource was created. + */ + createTime?: string | null; + /** + * Optional. Resource labels to represent user provided metadata. Each label is a key-value pair, where both the key and the value are arbitrary strings provided by the user. + */ + labels?: {[key: string]: string} | null; + /** + * The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. + */ + maintenancePolicyNames?: {[key: string]: string} | null; + /** + * The MaintenanceSchedule contains the scheduling information of published maintenance schedule. + */ + maintenanceSchedules?: { + [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule; + } | null; + /** + * Unique name of the resource. It uses the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + */ + name?: string | null; + /** + * Output only. Custom string attributes used primarily to expose producer-specific information in monitoring dashboards. See go/get-instance-metadata. + */ + producerMetadata?: {[key: string]: string} | null; + /** + * Output only. The list of data plane resources provisioned for this instance, e.g. compute VMs. See go/get-instance-metadata. + */ + provisionedResources?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource[]; + /** + * The map between RolloutType and the corresponding RolloutMetadata. This is only mutated by rollout service. For actuation implementation, this information is pass-through for Rollout management. Producer shall not modify by itself. For update of a single entry in this map, the update field mask shall follow this sementics: go/advanced-field-masks + */ + rolloutMetadata?: { + [key: string]: Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata; + } | null; + /** + * Link to the SLM instance template. Only populated when updating SLM instances via SSA's Actuation service adaptor. Service producers with custom control plane (e.g. Cloud SQL) doesn't need to populate this field. Instead they should use software_versions. + */ + slmInstanceTemplate?: string | null; + /** + * Output only. SLO metadata for instance classification in the Standardized dataplane SLO platform. See go/cloud-ssa-standard-slo for feature description. + */ + sloMetadata?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata; + /** + * Software versions that are used to deploy this instance. This can be mutated by rollout services. + */ + softwareVersions?: {[key: string]: string} | null; + /** + * Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use). + */ + state?: string | null; + /** + * Output only. ID of the associated GCP tenant project. See go/get-instance-metadata. + */ + tenantProjectId?: string | null; + /** + * Output only. Timestamp when the resource was last modified. + */ + updateTime?: string | null; + } + /** + * Maintenance schedule which is exposed to customer and potentially end user, indicating published upcoming future maintenance schedule + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule { + /** + * Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false + */ + canReschedule?: boolean | null; + /** + * The scheduled end time for the maintenance. + */ + endTime?: string | null; + /** + * The rollout management policy this maintenance schedule is associated with. When doing reschedule update request, the reschedule should be against this given policy. + */ + rolloutManagementPolicy?: string | null; + /** + * The scheduled start time for the maintenance. + */ + startTime?: string | null; + } + /** + * Node information for custom per-node SLO implementations. SSA does not support per-node SLO, but producers can populate per-node information in SloMetadata for custom precomputations. SSA Eligibility Exporter will emit per-node metric based on this information. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata { + /** + * By default node is eligible if instance is eligible. But individual node might be excluded from SLO by adding entry here. For semantic see SloMetadata.exclusions. If both instance and node level exclusions are present for time period, the node level's reason will be reported by Eligibility Exporter. + */ + exclusions?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion[]; + /** + * The location of the node, if different from instance location. + */ + location?: string | null; + /** + * The id of the node. This should be equal to SaasInstanceNode.node_id. + */ + nodeId?: string | null; + } + /** + * This message has been deprecated. NotificationMetadata is the notification state for an instance. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata { + /** + * Whether the instance update has been rescheduled. + */ + rescheduled?: boolean | null; + /** + * The scheduled end time for the maintenance window during which update can be performed on the instance. + */ + scheduledEndTime?: string | null; + /** + * The scheduled start time for the maintenance window during which update can be performed on the instance. + */ + scheduledStartTime?: string | null; + /** + * The target release to be applied to the instance. + */ + targetRelease?: string | null; + } + /** + * Describes provisioned dataplane resources. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource { + /** + * Type of the resource. This can be either a GCP resource or a custom one (e.g. another cloud provider's VM). For GCP compute resources use singular form of the names listed in GCP compute API documentation (https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed with 'compute-', for example: 'compute-instance', 'compute-disk', 'compute-autoscaler'. + */ + resourceType?: string | null; + /** + * URL identifying the resource, e.g. "https://www.googleapis.com/compute/v1/projects/...)". + */ + resourceUrl?: string | null; + } + /** + * This message has been deprecated. RolloutMetadata for an actuation instance. It maps to a single RolloutType. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1RolloutMetadata { + /** + * Instance level notification metadata. + */ + notification?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NotificationMetadata; + /** + * The last Release that has been applied to the instance. + */ + releaseName?: string | null; + /** + * The last rollout that has been applied to the instance. + */ + rolloutName?: string | null; + } + /** + * SloEligibility is a tuple containing eligibility value: true if an instance is eligible for SLO calculation or false if it should be excluded from all SLO-related calculations along with a user-defined reason. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility { + /** + * Whether an instance is eligible or ineligible. + */ + eligible?: boolean | null; + /** + * User-defined reason for the current value of instance eligibility. Usually, this can be directly mapped to the internal state. An empty reason is allowed. + */ + reason?: string | null; + } + /** + * SloExclusion represents an exclusion in SLI calculation applies to all SLOs. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion { + /** + * Exclusion duration. No restrictions on the possible values. When an ongoing operation is taking longer than initially expected, an existing entry in the exclusion list can be updated by extending the duration. This is supported by the subsystem exporting eligibility data as long as such extension is committed at least 10 minutes before the original exclusion expiration - otherwise it is possible that there will be "gaps" in the exclusion application in the exported timeseries. + */ + duration?: string | null; + /** + * Human-readable reason for the exclusion. This should be a static string (e.g. "Disruptive update in progress") and should not contain dynamically generated data (e.g. instance name). Can be left empty. + */ + reason?: string | null; + /** + * Name of an SLI that this exclusion applies to. Can be left empty, signaling that the instance should be excluded from all SLIs defined in the service SLO configuration. + */ + sliName?: string | null; + /** + * Start time of the exclusion. No alignment (e.g. to a full minute) needed. + */ + startTime?: string | null; + } + /** + * SloMetadata contains resources required for proper SLO classification of the instance. + */ + export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata { + /** + * Optional. User-defined instance eligibility. + */ + eligibility?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility; + /** + * List of SLO exclusion windows. When multiple entries in the list match (matching the exclusion time-window against current time point) the exclusion reason used in the first matching entry will be published. It is not needed to include expired exclusion in this list, as only the currently applicable exclusions are taken into account by the eligibility exporting subsystem (the historical state of exclusions will be reflected in the historically produced timeseries regardless of the current state). This field can be used to mark the instance as temporary ineligible for the purpose of SLO calculation. For permanent instance SLO exclusion, use of custom instance eligibility is recommended. See 'eligibility' field below. + */ + exclusions?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion[]; + /** + * Optional. List of nodes. Some producers need to use per-node metadata to calculate SLO. This field allows such producers to publish per-node SLO meta data, which will be consumed by SSA Eligibility Exporter and published in the form of per node metric to Monarch. + */ + nodes?: Schema$GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata[]; + /** + * Name of the SLO tier the Instance belongs to. This name will be expected to match the tiers specified in the service SLO configuration. Field is mandatory and must not be empty. + */ + tier?: string | null; + } + /** + * Response message for ListDomains + */ + export interface Schema$ListDomainsResponse { + /** + * A list of Managed Identities Service domains in the project. + */ + domains?: Schema$Domain[]; + /** + * A token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + /** + * A list of locations that could not be reached. + */ + unreachable?: string[] | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * 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 | null; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 be a resource name ending with `operations/{unique_id}`. + */ + name?: string | null; + /** + * 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * [Output only] API version used to start the operation. + */ + apiVersion?: string | null; + /** + * [Output only] Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + cancelRequested?: boolean | null; + /** + * [Output only] The time the operation was created. + */ + createTime?: string | null; + /** + * [Output only] The time the operation finished running. + */ + endTime?: string | null; + /** + * [Output only] Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * [Output only] Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * [Output only] Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: 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. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. + */ + version?: number | null; + } + /** + * Request message for ReconfigureTrust + */ + export interface Schema$ReconfigureTrustRequest { + /** + * Required. The target DNS server IP addresses to resolve the remote domain involved in the trust. + */ + targetDnsIpAddresses?: string[] | null; + /** + * Required. The fully-qualified target domain name which will be in trust with current domain. + */ + targetDomainName?: string | null; + } + /** + * Request message for ResetAdminPassword + */ + export interface Schema$ResetAdminPasswordRequest {} + /** + * Response message for ResetAdminPassword + */ + export interface Schema$ResetAdminPasswordResponse { + /** + * A random password. See admin for more information. + */ + password?: string | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + } + /** + * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * Represents a relationship between two domains. This allows a controller in one domain to authenticate a user in another domain. + */ + export interface Schema$Trust { + /** + * Output only. The time the instance was created. + */ + createTime?: string | null; + /** + * Output only. The last heartbeat time when the trust was known to be connected. + */ + lastTrustHeartbeatTime?: string | null; + /** + * The trust authentication type, which decides whether the trusted side has forest/domain wide access or selective access to an approved set of resources. + */ + selectiveAuthentication?: boolean | null; + /** + * Output only. The current state of the trust. + */ + state?: string | null; + /** + * Output only. Additional information about the current state of the trust, if available. + */ + stateDescription?: string | null; + /** + * The target DNS server IP addresses which can resolve the remote domain involved in the trust. + */ + targetDnsIpAddresses?: string[] | null; + /** + * The fully qualified target domain name which will be in trust with the current domain. + */ + targetDomainName?: string | null; + /** + * The trust direction, which decides if the current domain is trusted, trusting, or both. + */ + trustDirection?: string | null; + /** + * Input only, and will not be stored. The trust secret used for the handshake with the target domain. + */ + trustHandshakeSecret?: string | null; + /** + * The type of trust represented by the trust resource. + */ + trustType?: string | null; + /** + * Output only. The last update time. + */ + updateTime?: string | null; + } + /** + * Request message for ValidateTrust + */ + export interface Schema$ValidateTrustRequest { + /** + * Required. The domain trust to validate trust state for. + */ + trust?: Schema$Trust; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + global: Resource$Projects$Locations$Global; + constructor(context: APIRequestContext) { + this.context = context; + this.global = new Resource$Projects$Locations$Global(this.context); + } + + /** + * managedidentities.projects.locations.get + * @desc Gets information about a location. + * @alias managedidentities.projects.locations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Resource name for the location. + * @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$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.list + * @desc Lists information about the supported locations for this service. + * @alias managedidentities.projects.locations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {boolean=} params.includeUnrevealedLocations If true, the returned list will include locations which are not yet revealed. + * @param {string} params.name The resource that owns the locations collection, if applicable. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * If true, the returned list will include locations which are not yet revealed. + */ + includeUnrevealedLocations?: boolean; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Global { + context: APIRequestContext; + domains: Resource$Projects$Locations$Global$Domains; + operations: Resource$Projects$Locations$Global$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.domains = new Resource$Projects$Locations$Global$Domains( + this.context + ); + this.operations = new Resource$Projects$Locations$Global$Operations( + this.context + ); + } + } + + export class Resource$Projects$Locations$Global$Domains { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * managedidentities.projects.locations.global.domains.attachTrust + * @desc Adds an AD trust to a domain. + * @alias managedidentities.projects.locations.global.domains.attachTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().AttachTrustRequest} params.requestBody 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 + */ + attachTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + options?: MethodOptions + ): GaxiosPromise; + attachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + attachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Attachtrust, + callback: BodyResponseCallback + ): void; + attachTrust(callback: BodyResponseCallback): void; + attachTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Attachtrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Attachtrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Attachtrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:attachTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.create + * @desc Creates a Microsoft AD domain. + * @alias managedidentities.projects.locations.global.domains.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.domainName Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. + * @param {string} params.parent Required. The resource project name and location using the form: `projects/{project_id}/locations/global` + * @param {().Domain} params.requestBody 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$Locations$Global$Domains$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Global$Domains$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Global$Domains$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.delete + * @desc Deletes a domain. + * @alias managedidentities.projects.locations.global.domains.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_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 + */ + delete( + params?: Params$Resource$Projects$Locations$Global$Domains$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Domains$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Domains$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.detachTrust + * @desc Removes an AD trust. + * @alias managedidentities.projects.locations.global.domains.detachTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().DetachTrustRequest} params.requestBody 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 + */ + detachTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + options?: MethodOptions + ): GaxiosPromise; + detachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detachTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Detachtrust, + callback: BodyResponseCallback + ): void; + detachTrust(callback: BodyResponseCallback): void; + detachTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Detachtrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Detachtrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Detachtrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:detachTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.get + * @desc Gets information about a domain. + * @alias managedidentities.projects.locations.global.domains.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_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 + */ + get( + params?: Params$Resource$Projects$Locations$Global$Domains$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Domains$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Domains$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @alias managedidentities.projects.locations.global.domains.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.options.requestedPolicyVersion Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Getiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.list + * @desc Lists domains in a project. + * @alias managedidentities.projects.locations.global.domains.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter Optional. A filter specifying constraints of a list operation. For example, `Domain.fqdn="mydomain.myorginization"`. + * @param {string=} params.orderBy Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information. + * @param {integer=} params.pageSize Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used. Regardless of the page_size value, the response may include a partial list. Callers should rely on a response's next_page_token to determine if there are additional results to list. + * @param {string=} params.pageToken The `next_page_token` value returned from a previous ListDomainsRequest request, if any. + * @param {string} params.parent Required. The resource name of the domain location using the form: `projects/{project_id}/locations/global` + * @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$Locations$Global$Domains$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Domains$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Domains$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.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.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.patch + * @desc Updates the metadata and configuration of a domain. + * @alias managedidentities.projects.locations.global.domains.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Output only. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + * @param {string=} params.updateMask Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include fields from Domain: * `labels` * `locations` * `authorized_networks` + * @param {().Domain} params.requestBody 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$Locations$Global$Domains$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Global$Domains$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Global$Domains$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.reconfigureTrust + * @desc Updates the DNS conditional forwarder. + * @alias managedidentities.projects.locations.global.domains.reconfigureTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ReconfigureTrustRequest} params.requestBody 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 + */ + reconfigureTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + options?: MethodOptions + ): GaxiosPromise; + reconfigureTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reconfigureTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust, + callback: BodyResponseCallback + ): void; + reconfigureTrust(callback: BodyResponseCallback): void; + reconfigureTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:reconfigureTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.resetAdminPassword + * @desc Resets a domain's administrator password. + * @alias managedidentities.projects.locations.global.domains.resetAdminPassword + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ResetAdminPasswordRequest} params.requestBody 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 + */ + resetAdminPassword( + params?: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + options?: MethodOptions + ): GaxiosPromise; + resetAdminPassword( + params: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resetAdminPassword( + params: Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword, + callback: BodyResponseCallback + ): void; + resetAdminPassword( + callback: BodyResponseCallback + ): void; + resetAdminPassword( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:resetAdminPassword').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + * @alias managedidentities.projects.locations.global.domains.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.requestBody 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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Domains$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Setiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @alias managedidentities.projects.locations.global.domains.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.requestBody 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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Domains$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Testiampermissions + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.domains.validateTrust + * @desc Validates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests. + * @alias managedidentities.projects.locations.global.domains.validateTrust + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + * @param {().ValidateTrustRequest} params.requestBody 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 + */ + validateTrust( + params?: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + options?: MethodOptions + ): GaxiosPromise; + validateTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + validateTrust( + params: Params$Resource$Projects$Locations$Global$Domains$Validatetrust, + callback: BodyResponseCallback + ): void; + validateTrust(callback: BodyResponseCallback): void; + validateTrust( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Domains$Validatetrust + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Domains$Validatetrust; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Domains$Validatetrust; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:validateTrust').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Domains$Attachtrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AttachTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. + */ + domainName?: string; + /** + * Required. The resource project name and location using the form: `projects/{project_id}/locations/global` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Detachtrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DetachTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Getiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. A filter specifying constraints of a list operation. For example, `Domain.fqdn="mydomain.myorginization"`. + */ + filter?: string; + /** + * Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information. + */ + orderBy?: string; + /** + * Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used. Regardless of the page_size value, the response may include a partial list. Callers should rely on a response's next_page_token to determine if there are additional results to list. + */ + pageSize?: number; + /** + * The `next_page_token` value returned from a previous ListDomainsRequest request, if any. + */ + pageToken?: string; + /** + * Required. The resource name of the domain location using the form: `projects/{project_id}/locations/global` + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Output only. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`. + */ + name?: string; + /** + * Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include fields from Domain: * `labels` * `locations` * `authorized_networks` + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Domain; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Reconfiguretrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ReconfigureTrustRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Resetadminpassword + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ResetAdminPasswordRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Setiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Testiampermissions + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Projects$Locations$Global$Domains$Validatetrust + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ValidateTrustRequest; + } + + export class Resource$Projects$Locations$Global$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * managedidentities.projects.locations.global.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * @alias managedidentities.projects.locations.global.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @param {().CancelOperationRequest} params.requestBody 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$Locations$Global$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Cancel + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.operations.delete + * @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + * @alias managedidentities.projects.locations.global.operations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be deleted. + * @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$Locations$Global$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.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 managedidentities.projects.locations.global.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$Locations$Global$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * managedidentities.projects.locations.global.operations.list + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @alias managedidentities.projects.locations.global.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$Global$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Operations$Cancel + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/managedidentities/webpack.config.js b/src/apis/managedidentities/webpack.config.js new file mode 100644 index 0000000000..6d54d65218 --- /dev/null +++ b/src/apis/managedidentities/webpack.config.js @@ -0,0 +1,69 @@ +// Copyright 2019 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. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + }, + output: { + library: 'Managedidentities', + filename: 'managedidentities.min.js', + path: path.resolve(__dirname, 'dist'), + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +}; diff --git a/src/apis/manufacturers/v1.ts b/src/apis/manufacturers/v1.ts index be3f04026b..60e7d6514e 100644 --- a/src/apis/manufacturers/v1.ts +++ b/src/apis/manufacturers/v1.ts @@ -223,6 +223,10 @@ export namespace manufacturers_v1 { * The release date of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#release. */ releaseDate?: string | null; + /** + * Rich product content. For more information, see https://support.google.com/manufacturers/answer/9389865 + */ + richContent?: string[] | null; /** * The scent of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#scent. */ diff --git a/src/apis/ml/v1.ts b/src/apis/ml/v1.ts index 6e1a7915f2..2de6e5bfe5 100644 --- a/src/apis/ml/v1.ts +++ b/src/apis/ml/v1.ts @@ -132,6 +132,21 @@ export namespace ml_v1 { */ extensions?: Array<{[key: string]: any}> | null; } + export interface Schema$GoogleCloudMlV1_AutomatedStoppingConfig_DecayCurveAutomatedStoppingConfig { + /** + * True if measurement.elapsed_time is used as the x-axis of each Trials Decay Curve. Otherwise, Measurement.steps will be used as the x-axis. + */ + useElapsedTime?: boolean | null; + } + /** + * The median automated stopping rule stops a pending trial if the trial's best objective_value is strictly below the median 'performance' of all completed trials reported up to the trial's last measurement. Currently, 'performance' refers to the running average of the objective values reported by the trial in each measurement. + */ + export interface Schema$GoogleCloudMlV1_AutomatedStoppingConfig_MedianAutomatedStoppingConfig { + /** + * True if median automated stopping rule applies on measurement.use_elapsed_time. it means that elapsed_time field of latest measurement of current trial is used to compute median objective value for each completed trials. + */ + useElapsedTime?: boolean | null; + } /** * An observed value of a metric. */ @@ -145,6 +160,152 @@ export namespace ml_v1 { */ trainingStep?: string | null; } + /** + * A message representing a metric in the measurement. + */ + export interface Schema$GoogleCloudMlV1_Measurement_Metric { + /** + * Required. Metric name. + */ + metric?: string | null; + /** + * Required. The value for this metric. + */ + value?: number | null; + } + export interface Schema$GoogleCloudMlV1_StudyConfigParameterSpec_CategoricalValueSpec { + /** + * Must be specified if type is `CATEGORICAL`. The list of possible categories. + */ + values?: string[] | null; + } + export interface Schema$GoogleCloudMlV1_StudyConfigParameterSpec_DiscreteValueSpec { + /** + * Must be specified if type is `DISCRETE`. A list of feasible points. The list should be in strictly increasing order. For instance, this parameter might have possible settings of 1.5, 2.5, and 4.0. This list should not contain more than 1,000 values. + */ + values?: number[] | null; + } + export interface Schema$GoogleCloudMlV1_StudyConfigParameterSpec_DoubleValueSpec { + /** + * Must be specified if type is `DOUBLE`. Maximum value of the parameter. + */ + maxValue?: number | null; + /** + * Must be specified if type is `DOUBLE`. Minimum value of the parameter. + */ + minValue?: number | null; + } + export interface Schema$GoogleCloudMlV1_StudyConfigParameterSpec_IntegerValueSpec { + /** + * Must be specified if type is `INTEGER`. Maximum value of the parameter. + */ + maxValue?: string | null; + /** + * Must be specified if type is `INTEGER`. Minimum value of the parameter. + */ + minValue?: string | null; + } + /** + * Represents the spec to match categorical values from parent parameter. + */ + export interface Schema$GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentCategoricalValueSpec { + /** + * Matches values of the parent parameter with type 'CATEGORICAL'. All values must exist in `categorical_value_spec` of parent parameter. + */ + values?: string[] | null; + } + /** + * Represents the spec to match discrete values from parent parameter. + */ + export interface Schema$GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentDiscreteValueSpec { + /** + * Matches values of the parent parameter with type 'DISCRETE'. All values must exist in `discrete_value_spec` of parent parameter. + */ + values?: number[] | null; + } + /** + * Represents the spec to match integer values from parent parameter. + */ + export interface Schema$GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentIntValueSpec { + /** + * Matches values of the parent parameter with type 'INTEGER'. All values must lie in `integer_value_spec` of parent parameter. + */ + values?: string[] | null; + } + /** + * Represents a metric to optimize. + */ + export interface Schema$GoogleCloudMlV1_StudyConfig_MetricSpec { + /** + * Required. The optimization goal of the metric. + */ + goal?: string | null; + /** + * Required. The name of the metric. + */ + metric?: string | null; + } + /** + * Represents a single parameter to optimize. + */ + export interface Schema$GoogleCloudMlV1_StudyConfig_ParameterSpec { + /** + * The value spec for a 'CATEGORICAL' parameter. + */ + categoricalValueSpec?: Schema$GoogleCloudMlV1_StudyConfigParameterSpec_CategoricalValueSpec; + /** + * A child node is active if the parameter's value matches the child node's matching_parent_values. If two items in child_parameter_specs have the same name, they must have disjoint matching_parent_values. + */ + childParameterSpecs?: Schema$GoogleCloudMlV1_StudyConfig_ParameterSpec[]; + /** + * The value spec for a 'DISCRETE' parameter. + */ + discreteValueSpec?: Schema$GoogleCloudMlV1_StudyConfigParameterSpec_DiscreteValueSpec; + /** + * The value spec for a 'DOUBLE' parameter. + */ + doubleValueSpec?: Schema$GoogleCloudMlV1_StudyConfigParameterSpec_DoubleValueSpec; + /** + * The value spec for an 'INTEGER' parameter. + */ + integerValueSpec?: Schema$GoogleCloudMlV1_StudyConfigParameterSpec_IntegerValueSpec; + /** + * Required. The parameter name must be unique amongst all ParameterSpecs. + */ + parameter?: string | null; + parentCategoricalValues?: Schema$GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentCategoricalValueSpec; + parentDiscreteValues?: Schema$GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentDiscreteValueSpec; + parentIntValues?: Schema$GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentIntValueSpec; + /** + * How the parameter should be scaled. Leave unset for categorical parameters. + */ + scaleType?: string | null; + /** + * Required. The type of the parameter. + */ + type?: string | null; + } + /** + * A message representing a parameter to be tuned. + */ + export interface Schema$GoogleCloudMlV1_Trial_Parameter { + /** + * Must be set if ParameterType is DOUBLE or DISCRETE. + */ + floatValue?: number | null; + /** + * Must be set if ParameterType is INTEGER + */ + intValue?: string | null; + /** + * The name of the parameter. + */ + parameter?: string | null; + /** + * Must be set if ParameterTypeis CATEGORICAL + */ + stringValue?: string | null; + } /** * Represents a hardware accelerator request config. Note that the AcceleratorConfig can be used in both Jobs and Versions. Learn more about [accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for online prediction](/ml-engine/docs/machine-types-online-prediction#gpus). */ @@ -158,6 +319,22 @@ export namespace ml_v1 { */ type?: string | null; } + /** + * The request message for the AddTrialMeasurement service method. + */ + export interface Schema$GoogleCloudMlV1__AddTrialMeasurementRequest { + /** + * Required. The measurement to be added to a trial. + */ + measurement?: Schema$GoogleCloudMlV1__Measurement; + } + /** + * Configuration for Automated Early Stopping of Trials. If no implementation_config is set, automated early stopping will not be run. + */ + export interface Schema$GoogleCloudMlV1__AutomatedStoppingConfig { + decayCurveStoppingConfig?: Schema$GoogleCloudMlV1_AutomatedStoppingConfig_DecayCurveAutomatedStoppingConfig; + medianAutomatedStoppingConfig?: Schema$GoogleCloudMlV1_AutomatedStoppingConfig_MedianAutomatedStoppingConfig; + } /** * Options for automatically scaling a model. */ @@ -199,12 +376,76 @@ export namespace ml_v1 { availableAccelerators?: string[] | null; type?: string | null; } + /** + * This message will be placed in the metadata field of a google.longrunning.Operation associated with a CheckTrialEarlyStoppingState request. + */ + export interface Schema$GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata { + /** + * The time operation was submitted. + */ + createTime?: string | null; + /** + * The name of the study that the trial belongs to. + */ + study?: string | null; + /** + * The Trial name. + */ + trial?: string | null; + } + /** + * The request message for the CheckTrialEarlyStoppingState service method. + */ + export interface Schema$GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest {} + /** + * The message will be placed in the response field of a completed google.longrunning.Operation associated with a CheckTrialEarlyStoppingState request. + */ + export interface Schema$GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse { + /** + * The time operation processing completed. + */ + endTime?: string | null; + /** + * True if the Trial should stop. + */ + shouldStop?: boolean | null; + /** + * The time operation was started. + */ + startTime?: string | null; + } + /** + * The request message for the CompleteTrial service method. + */ + export interface Schema$GoogleCloudMlV1__CompleteTrialRequest { + /** + * Optional. If provided, it will be used as the completed trial's final_measurement; Otherwise, the service will auto-select a previously reported measurement as the final-measurement + */ + finalMeasurement?: Schema$GoogleCloudMlV1__Measurement; + /** + * Optional. A human readable reason why the Trial was infeasible. This should only be provided if `trial_infeasible` is true. + */ + infeasibleReason?: string | null; + /** + * Optional. True if the trial cannot be run with the given Parameter, and final_measurement will be ignored. + */ + trialInfeasible?: boolean | null; + } export interface Schema$GoogleCloudMlV1__Config { /** * The service account Cloud ML uses to run on TPU node. */ tpuServiceAccount?: string | null; } + /** + * Represents a custom encryption key configuration that can be applied to a resource. + */ + export interface Schema$GoogleCloudMlV1__EncryptionConfig { + /** + * The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource, such as a training job. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + */ + kmsKeyName?: string | null; + } /** * Request for explanations to be issued against a trained model. */ @@ -215,11 +456,21 @@ export namespace ml_v1 { httpBody?: Schema$GoogleApi__HttpBody; } /** - * Message holding configuration options for explaining model predictions. There are two feature attribution methods supported for TensorFlow models: integrated gradients and sampled Shapley. <a href="/ml-engine/docs/ai-explanations/overview">Learn more about feature attributions</a>. + * Message holding configuration options for explaining model predictions. There are two feature attribution methods supported for TensorFlow models: integrated gradients and sampled Shapley. [Learn more about feature attributions.](/ml-engine/docs/ai-explanations/overview) */ export interface Schema$GoogleCloudMlV1__ExplanationConfig { + /** + * Attributes credit by computing the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: http://proceedings.mlr.press/v70/sundararajan17a.html + */ integratedGradientsAttribution?: Schema$GoogleCloudMlV1__IntegratedGradientsAttribution; + /** + * An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features. + */ sampledShapleyAttribution?: Schema$GoogleCloudMlV1__SampledShapleyAttribution; + /** + * Attributes credit by computing the XRAI taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Currently only implemented for models with natural image inputs. + */ + xraiAttribution?: Schema$GoogleCloudMlV1__XraiAttribution; } /** * Returns service account information associated with a project. @@ -415,6 +666,21 @@ export namespace ml_v1 { */ nextPageToken?: string | null; } + export interface Schema$GoogleCloudMlV1__ListStudiesResponse { + /** + * The Studies associated with the project. + */ + studies?: Schema$GoogleCloudMlV1__Study[]; + } + /** + * The response message for the ListTrials method. + */ + export interface Schema$GoogleCloudMlV1__ListTrialsResponse { + /** + * The trials associated with the study. + */ + trials?: Schema$GoogleCloudMlV1__Trial[]; + } /** * Response message for the ListVersions method. */ @@ -444,6 +710,23 @@ export namespace ml_v1 { */ nodes?: number | null; } + /** + * A message representing a Measurement. + */ + export interface Schema$GoogleCloudMlV1__Measurement { + /** + * Time that the Trial has been running at the point of this Measurement. + */ + elapsedTime?: string | null; + /** + * Provides a list of metrics that act as inputs into the objective function. + */ + metrics?: Schema$GoogleCloudMlV1_Measurement_Metric[]; + /** + * The number of steps a machine learning model has been trained for. Must be non-negative. + */ + stepCount?: string | null; + } /** * Represents a machine learning solution. A model can have multiple versions, each of which is a deployed, trained model ready to receive prediction requests. The model itself is just a container. */ @@ -690,6 +973,105 @@ export namespace ml_v1 { * Request message for the SetDefaultVersion request. */ export interface Schema$GoogleCloudMlV1__SetDefaultVersionRequest {} + export interface Schema$GoogleCloudMlV1__StopTrialRequest {} + /** + * A message representing a Study. + */ + export interface Schema$GoogleCloudMlV1__Study { + /** + * Output only. Time that the study was created. + */ + createTime?: string | null; + /** + * Output only. A human readable reason why the Study is inactive. This should be empty if a study is ACTIVE or COMPLETED. + */ + inactiveReason?: string | null; + /** + * Output only. The name of a study. + */ + name?: string | null; + /** + * Output only. The detailed state of a study. + */ + state?: string | null; + /** + * Required. Configuration of the study. + */ + studyConfig?: Schema$GoogleCloudMlV1__StudyConfig; + } + /** + * Represents configuration of a study. + */ + export interface Schema$GoogleCloudMlV1__StudyConfig { + /** + * The search algorithm specified for the study. + */ + algorithm?: string | null; + /** + * Configuration for automated stopping of unpromising Trials. + */ + automatedStoppingConfig?: Schema$GoogleCloudMlV1__AutomatedStoppingConfig; + metrics?: Schema$GoogleCloudMlV1_StudyConfig_MetricSpec[]; + /** + * Required. The set of parameters to tune. + */ + parameters?: Schema$GoogleCloudMlV1_StudyConfig_ParameterSpec[]; + } + /** + * Metadata field of a google.longrunning.Operation associated with a SuggestTrialsRequest. + */ + export interface Schema$GoogleCloudMlV1__SuggestTrialsMetadata { + /** + * The identifier of the client that is requesting the suggestion. + */ + clientId?: string | null; + /** + * The time operation was submitted. + */ + createTime?: string | null; + /** + * The name of the study that the trial belongs to. + */ + study?: string | null; + /** + * The number of suggestions requested. + */ + suggestionCount?: number | null; + } + /** + * The request message for the SuggestTrial service method. + */ + export interface Schema$GoogleCloudMlV1__SuggestTrialsRequest { + /** + * Required. The identifier of the client that is requesting the suggestion. If multiple SuggestTrialsRequests have the same `client_id`, the service will return the identical suggested trial if the trial is pending, and provide a new trial if the last suggested trial was completed. + */ + clientId?: string | null; + /** + * Required. The number of suggestions requested. + */ + suggestionCount?: number | null; + } + /** + * This message will be placed in the response field of a completed google.longrunning.Operation associated with a SuggestTrials request. + */ + export interface Schema$GoogleCloudMlV1__SuggestTrialsResponse { + /** + * The time operation processing completed. + */ + endTime?: string | null; + /** + * The time operation was started. + */ + startTime?: string | null; + /** + * The state of the study. + */ + studyState?: string | null; + /** + * A list of Trials. + */ + trials?: Schema$GoogleCloudMlV1__Trial[]; + } /** * Represents input parameters for a training job. When using the gcloud command to submit your training job, you can specify the input parameters as command-line arguments and/or in a YAML configuration file referenced from the --config command-line argument. For details, see the guide to [submitting a training job](/ai-platform/training/docs/training-jobs). */ @@ -698,6 +1080,10 @@ export namespace ml_v1 { * Optional. Command line arguments to pass to the program. */ args?: string[] | null; + /** + * Custom encryption key options for a training job. If this is set, then all resources created by the training job will be encrypted with the provided encryption key. + */ + encryptionConfig?: Schema$GoogleCloudMlV1__EncryptionConfig; /** * Optional. The set of Hyperparameters to tune. */ @@ -804,6 +1190,51 @@ export namespace ml_v1 { */ trials?: Schema$GoogleCloudMlV1__HyperparameterOutput[]; } + /** + * A message representing a Trial. + */ + export interface Schema$GoogleCloudMlV1__Trial { + /** + * Output only. The identifier of the client that originally requested this trial. + */ + clientId?: string | null; + /** + * Output only. Time the Trial's status changed to COMPLETED. + */ + endTime?: string | null; + /** + * The final Measurement containing the objective value. + */ + finalMeasurement?: Schema$GoogleCloudMlV1__Measurement; + /** + * Output only. A human readable string describing why the Trial is infeasible. This should only be set if trial_infeasible is true. + */ + infeasibleReason?: string | null; + /** + * A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations. + */ + measurements?: Schema$GoogleCloudMlV1__Measurement[]; + /** + * Output only. Name of the trial assigned by the service. + */ + name?: string | null; + /** + * The parameters of the Trial. + */ + parameters?: Schema$GoogleCloudMlV1_Trial_Parameter[]; + /** + * Output only. Time the Trial was started. + */ + startTime?: string | null; + /** + * The detailed state of a trial. + */ + state?: string | null; + /** + * Output only. True if the parameters in this trial should not be attempted again. + */ + trialInfeasible?: boolean | null; + } /** * Represents a version of the model. Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions. You can get information about all of the versions of a given model by calling projects.models.versions.list. */ @@ -897,6 +1328,15 @@ export namespace ml_v1 { */ state?: string | null; } + /** + * Attributes credit by computing the XRAI taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Currently only implemented for models with natural image inputs. + */ + export interface Schema$GoogleCloudMlV1__XraiAttribution { + /** + * Number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range. + */ + numIntegralSteps?: number | null; + } /** * 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:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. */ @@ -2140,8 +2580,14 @@ export namespace ml_v1 { export class Resource$Projects$Locations { context: APIRequestContext; + operations: Resource$Projects$Locations$Operations; + studies: Resource$Projects$Locations$Studies; constructor(context: APIRequestContext) { this.context = context; + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + this.studies = new Resource$Projects$Locations$Studies(this.context); } /** @@ -2347,6 +2793,1429 @@ export namespace ml_v1 { parent?: string; } + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * ml.projects.locations.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * @alias ml.projects.locations.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @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$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.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 ml.projects.locations.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$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * 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$Locations$Studies { + context: APIRequestContext; + trials: Resource$Projects$Locations$Studies$Trials; + constructor(context: APIRequestContext) { + this.context = context; + this.trials = new Resource$Projects$Locations$Studies$Trials( + this.context + ); + } + + /** + * ml.projects.locations.studies.create + * @desc Creates a study. + * @alias ml.projects.locations.studies.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location} + * @param {string=} params.studyId Required. The ID to use for the study, which will become the final component of the study's resource name. + * @param {().GoogleCloudMlV1__Study} params.requestBody 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$Locations$Studies$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Studies$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Studies$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/studies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.delete + * @desc Deletes a study. + * @alias ml.projects.locations.studies.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The study 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 + */ + delete( + params?: Params$Resource$Projects$Locations$Studies$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Studies$Delete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Studies$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.get + * @desc Gets a study. + * @alias ml.projects.locations.studies.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The study 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 + */ + get( + params?: Params$Resource$Projects$Locations$Studies$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Studies$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Studies$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.list + * @desc Lists all the studies in a region for an associated project. + * @alias ml.projects.locations.studies.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location} + * @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$Locations$Studies$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Studies$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudMlV1__ListStudiesResponse + > + ): void; + list( + params: Params$Resource$Projects$Locations$Studies$List, + callback: BodyResponseCallback< + Schema$GoogleCloudMlV1__ListStudiesResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudMlV1__ListStudiesResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudMlV1__ListStudiesResponse + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/studies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Studies$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location} + */ + parent?: string; + /** + * Required. The ID to use for the study, which will become the final component of the study's resource name. + */ + studyId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudMlV1__Study; + } + export interface Params$Resource$Projects$Locations$Studies$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The study name. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Studies$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The study name. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Studies$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location} + */ + parent?: string; + } + + export class Resource$Projects$Locations$Studies$Trials { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * ml.projects.locations.studies.trials.addMeasurement + * @desc Adds a measurement of the objective metrics to a Trial. This measurement is assumed to have been taken before the Trial is complete. + * @alias ml.projects.locations.studies.trials.addMeasurement + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The trial name. + * @param {().GoogleCloudMlV1__AddTrialMeasurementRequest} params.requestBody 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 + */ + addMeasurement( + params?: Params$Resource$Projects$Locations$Studies$Trials$Addmeasurement, + options?: MethodOptions + ): GaxiosPromise; + addMeasurement( + params: Params$Resource$Projects$Locations$Studies$Trials$Addmeasurement, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addMeasurement( + params: Params$Resource$Projects$Locations$Studies$Trials$Addmeasurement, + callback: BodyResponseCallback + ): void; + addMeasurement( + callback: BodyResponseCallback + ): void; + addMeasurement( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Addmeasurement + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Addmeasurement; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Addmeasurement; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:addMeasurement').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.trials.checkEarlyStoppingState + * @desc Checks whether a trial should stop or not. + * @alias ml.projects.locations.studies.trials.checkEarlyStoppingState + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The trial name. + * @param {().GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest} params.requestBody 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 + */ + checkEarlyStoppingState( + params?: Params$Resource$Projects$Locations$Studies$Trials$Checkearlystoppingstate, + options?: MethodOptions + ): GaxiosPromise; + checkEarlyStoppingState( + params: Params$Resource$Projects$Locations$Studies$Trials$Checkearlystoppingstate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + checkEarlyStoppingState( + params: Params$Resource$Projects$Locations$Studies$Trials$Checkearlystoppingstate, + callback: BodyResponseCallback + ): void; + checkEarlyStoppingState( + callback: BodyResponseCallback + ): void; + checkEarlyStoppingState( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Checkearlystoppingstate + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Checkearlystoppingstate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Checkearlystoppingstate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:checkEarlyStoppingState').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * ml.projects.locations.studies.trials.complete + * @desc Marks a Trial as complete. + * @alias ml.projects.locations.studies.trials.complete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The trial name. + * @param {().GoogleCloudMlV1__CompleteTrialRequest} params.requestBody 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 + */ + complete( + params?: Params$Resource$Projects$Locations$Studies$Trials$Complete, + options?: MethodOptions + ): GaxiosPromise; + complete( + params: Params$Resource$Projects$Locations$Studies$Trials$Complete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + complete( + params: Params$Resource$Projects$Locations$Studies$Trials$Complete, + callback: BodyResponseCallback + ): void; + complete( + callback: BodyResponseCallback + ): void; + complete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Complete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Complete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Complete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:complete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.trials.create + * @desc Adds a user provided trial to a Study. + * @alias ml.projects.locations.studies.trials.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the study that the trial belongs to. + * @param {().GoogleCloudMlV1__Trial} params.requestBody 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$Locations$Studies$Trials$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Studies$Trials$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Studies$Trials$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/trials').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.trials.delete + * @desc Deletes a Trial. + * @alias ml.projects.locations.studies.trials.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The trial 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 + */ + delete( + params?: Params$Resource$Projects$Locations$Studies$Trials$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Studies$Trials$Delete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Studies$Trials$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.trials.get + * @desc Gets a Trial. + * @alias ml.projects.locations.studies.trials.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The trial 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 + */ + get( + params?: Params$Resource$Projects$Locations$Studies$Trials$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Studies$Trials$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Studies$Trials$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.trials.list + * @desc Lists the trials associated with a Study. + * @alias ml.projects.locations.studies.trials.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the study that the trial belongs to. + * @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$Locations$Studies$Trials$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Studies$Trials$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Studies$Trials$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudMlV1__ListTrialsResponse + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/trials').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * ml.projects.locations.studies.trials.stop + * @desc Stops a trial. + * @alias ml.projects.locations.studies.trials.stop + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The trial name. + * @param {().GoogleCloudMlV1__StopTrialRequest} params.requestBody 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 + */ + stop( + params?: Params$Resource$Projects$Locations$Studies$Trials$Stop, + options?: MethodOptions + ): GaxiosPromise; + stop( + params: Params$Resource$Projects$Locations$Studies$Trials$Stop, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stop( + params: Params$Resource$Projects$Locations$Studies$Trials$Stop, + callback: BodyResponseCallback + ): void; + stop(callback: BodyResponseCallback): void; + stop( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Stop + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Stop; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Stop; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:stop').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ml.projects.locations.studies.trials.suggest + * @desc Returns a long-running operation associated with the generation of trial suggestions. + * @alias ml.projects.locations.studies.trials.suggest + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the study that the trial belongs to. + * @param {().GoogleCloudMlV1__SuggestTrialsRequest} params.requestBody 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 + */ + suggest( + params?: Params$Resource$Projects$Locations$Studies$Trials$Suggest, + options?: MethodOptions + ): GaxiosPromise; + suggest( + params: Params$Resource$Projects$Locations$Studies$Trials$Suggest, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggest( + params: Params$Resource$Projects$Locations$Studies$Trials$Suggest, + callback: BodyResponseCallback + ): void; + suggest( + callback: BodyResponseCallback + ): void; + suggest( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Studies$Trials$Suggest + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Studies$Trials$Suggest; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Studies$Trials$Suggest; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://ml.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/trials:suggest').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Studies$Trials$Addmeasurement + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The trial name. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudMlV1__AddTrialMeasurementRequest; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$Checkearlystoppingstate + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The trial name. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$Complete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The trial name. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudMlV1__CompleteTrialRequest; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the study that the trial belongs to. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudMlV1__Trial; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The trial name. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The trial name. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the study that the trial belongs to. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$Stop + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The trial name. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudMlV1__StopTrialRequest; + } + export interface Params$Resource$Projects$Locations$Studies$Trials$Suggest + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the study that the trial belongs to. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudMlV1__SuggestTrialsRequest; + } + export class Resource$Projects$Models { context: APIRequestContext; versions: Resource$Projects$Models$Versions; diff --git a/src/apis/monitoring/README.md b/src/apis/monitoring/README.md index 550de19ef4..ca84813e07 100644 --- a/src/apis/monitoring/README.md +++ b/src/apis/monitoring/README.md @@ -2,7 +2,7 @@ # monitoring -> Manages your Stackdriver Monitoring data and configurations. Most projects must be associated with a Stackdriver account, with a few exceptions as noted on the individual method pages. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the [Stackdriver Monitoring documentation](/monitoring/docs). +> Manages your Cloud Monitoring data and configurations. Most projects must be associated with a Workspace, with a few exceptions as noted on the individual method pages. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the [Cloud Monitoring documentation](/monitoring/docs). ## Installation diff --git a/src/apis/networkmanagement/README.md b/src/apis/networkmanagement/README.md new file mode 100644 index 0000000000..40fc0cf1e6 --- /dev/null +++ b/src/apis/networkmanagement/README.md @@ -0,0 +1,47 @@ +Google Inc. logo + +# networkmanagement + +> The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. + +## Installation + +```sh +$ npm install googleapis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). + +## Building a browser bundle + +This library can be used in a browser. To prepare a single file bundle, clone the +[repository](https://github.com/googleapis/google-api-nodejs-client) and run + +```sh +$ cd src/apis/networkmanagement +$ npm install +$ npm run webpack +``` + +The generated bundle will be written to `dist/networkmanagement.min.js`. Use it from your HTML file: + +```html + + +``` + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE). + +## 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/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/networkmanagement/index.ts b/src/apis/networkmanagement/index.ts new file mode 100644 index 0000000000..c0251ab237 --- /dev/null +++ b/src/apis/networkmanagement/index.ts @@ -0,0 +1,39 @@ +// Copyright 2019 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 {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {networkmanagement_v1beta1} from './v1beta1'; + +export const VERSIONS = { + v1beta1: networkmanagement_v1beta1.Networkmanagement, +}; + +export function networkmanagement( + version: 'v1beta1' +): networkmanagement_v1beta1.Networkmanagement; +export function networkmanagement( + options: networkmanagement_v1beta1.Options +): networkmanagement_v1beta1.Networkmanagement; +export function networkmanagement< + T = networkmanagement_v1beta1.Networkmanagement +>( + this: GoogleConfigurable, + versionOrOptions: 'v1beta1' | networkmanagement_v1beta1.Options +) { + return getAPI('networkmanagement', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; diff --git a/src/apis/networkmanagement/package.json b/src/apis/networkmanagement/package.json new file mode 100644 index 0000000000..02d4a00e84 --- /dev/null +++ b/src/apis/networkmanagement/package.json @@ -0,0 +1,43 @@ +{ + "name": "@google/networkmanagement", + "version": "0.1.0", + "description": "networkmanagement", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=8.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "docs": "typedoc --out docs/", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^3.0.0" + }, + "devDependencies": { + "gts": "^1.0.0", + "null-loader": "^3.0.0", + "ts-loader": "^6.0.4", + "typedoc": "^0.16.0", + "typescript": "~3.7.0", + "webpack": "^4.35.3", + "webpack-cli": "^3.3.5" + } +} diff --git a/src/apis/networkmanagement/tsconfig.json b/src/apis/networkmanagement/tsconfig.json new file mode 100644 index 0000000000..e081090496 --- /dev/null +++ b/src/apis/networkmanagement/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/networkmanagement/v1beta1.ts b/src/apis/networkmanagement/v1beta1.ts new file mode 100644 index 0000000000..25400a6091 --- /dev/null +++ b/src/apis/networkmanagement/v1beta1.ts @@ -0,0 +1,2392 @@ +// Copyright 2019 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. + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, +} from 'google-auth-library'; +import { + GoogleConfigurable, + createAPIRequest, + MethodOptions, + GlobalOptions, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {GaxiosPromise} from 'gaxios'; + +// tslint:disable: no-any +// tslint:disable: class-name +// tslint:disable: variable-name +// tslint:disable: jsdoc-format +// tslint:disable: no-namespace + +export namespace networkmanagement_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + interface StandardParameters { + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Network Management API + * + * The Network Management API provides a collection of network performance monitoring and diagnostic capabilities. + * + * @example + * const {google} = require('googleapis'); + * const networkmanagement = google.networkmanagement('v1beta1'); + * + * @namespace networkmanagement + * @type {Function} + * @version v1beta1 + * @variation v1beta1 + * @param {object=} options Options for Networkmanagement + */ + export class Networkmanagement { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Details of the final state "abort" and associated resource. + */ + export interface Schema$AbortInfo { + /** + * Causes that the analysis is aborted. + */ + cause?: string | null; + /** + * URI of the resource that caused the abort. + */ + resourceUri?: string | null; + } + /** + * 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:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.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 | null; + } + /** + * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.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[] | null; + /** + * The log type that this config enables. + */ + logType?: string | null; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. + */ + 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@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * A Connectivity Test for a network reachability analysis. + */ + export interface Schema$ConnectivityTest { + /** + * Output only. The time the test was created. + */ + createTime?: string | null; + /** + * The user-supplied description of the Connectivity Test. Maximum of 512 characters. + */ + description?: string | null; + /** + * Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test. + */ + destination?: Schema$Endpoint; + /** + * Output only. The display name of a Connectivity Test. + */ + displayName?: string | null; + /** + * Resource labels to represent user-provided metadata. + */ + labels?: {[key: string]: string} | null; + /** + * Required. Unique name of the resource using the form: `projects/{project_id}/tests/{test_id}` + */ + name?: string | null; + /** + * IP Protocol of the test. When not provided, "TCP" is assumed. + */ + protocol?: string | null; + /** + * Output only. The reachability details of this test from the latest run. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test. + */ + reachabilityDetails?: Schema$ReachabilityDetails; + /** + * Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries. + */ + relatedProjects?: string[] | null; + /** + * Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test. + */ + source?: Schema$Endpoint; + /** + * Output only. The time the test's configuration was updated. + */ + updateTime?: string | null; + } + /** + * Details of the final state "deliver" and associated resource. + */ + export interface Schema$DeliverInfo { + /** + * URI of the resource that the packet is delivered to. + */ + resourceUri?: string | null; + /** + * Target type where the packet is delivered to. + */ + target?: string | null; + } + /** + * Details of the final state "drop" and associated resource. + */ + export interface Schema$DropInfo { + /** + * Cause that the packet is dropped. + */ + cause?: string | null; + /** + * URI of the resource that caused the drop. + */ + resourceUri?: string | null; + } + /** + * 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 {} + /** + * Source or destination of the Connectivity Test. + */ + export interface Schema$Endpoint { + /** + * A Compute Engine instance URI. + */ + instance?: string | null; + /** + * The IP address of the endpoint, which can be an external or internal IP. An IPv6 address is only allowed when the test's destination is a [global load balancer VIP](/load-balancing/docs/load-balancing-overview). + */ + ipAddress?: string | null; + /** + * A Compute Engine network URI. + */ + network?: string | null; + /** + * Type of the network where the endpoint is located. Applicable only to source endpoint, as destination network type can be inferred from the source. + */ + networkType?: string | null; + /** + * The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP. + */ + port?: number | null; + /** + * Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID: 1. Only the IP address is specified, and the IP address is within a GCP project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project. + */ + projectId?: string | null; + } + /** + * For display only. The specification of the endpoints for the test. EndpointInfo is derived from source and destination Endpoint and validated by the backend data plane model. + */ + export interface Schema$EndpointInfo { + /** + * Destination IP address. + */ + destinationIp?: string | null; + /** + * URI of the network where this packet is sent to. + */ + destinationNetworkUri?: string | null; + /** + * Destination port. Only valid when protocol is TCP or UDP. + */ + destinationPort?: number | null; + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + */ + protocol?: string | null; + /** + * Source IP address. + */ + sourceIp?: string | null; + /** + * URI of the network where this packet originates from. + */ + sourceNetworkUri?: string | null; + /** + * Source port. Only valid when protocol is TCP or UDP. + */ + sourcePort?: number | null; + } + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * 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 | null; + } + /** + * For display only. Metadata associated with a Compute Engine firewall rule. + */ + export interface Schema$FirewallInfo { + /** + * Possible values: ALLOW, DENY + */ + action?: string | null; + /** + * Possible values: INGRESS, EGRESS + */ + direction?: string | null; + /** + * Name of a Compute Engine firewall rule. + */ + displayName?: string | null; + /** + * URI of a Compute Engine network. + */ + networkUri?: string | null; + /** + * Priority of the firewall rule. + */ + priority?: number | null; + /** + * Target service accounts of the firewall rule. + */ + targetServiceAccounts?: string[] | null; + /** + * Target tags of the firewall rule. + */ + targetTags?: string[] | null; + /** + * URI of a Compute Engine firewall rule. Implied default rule does not have URI. + */ + uri?: string | null; + } + /** + * Details of the final state "forward" and associated resource. + */ + export interface Schema$ForwardInfo { + /** + * URI of the resource that the packet is forwarded to. + */ + resourceUri?: string | null; + /** + * Target type where this packet is forwarded to. + */ + target?: string | null; + } + /** + * For display only. Metadata associated with a Compute Engine forwarding rule. + */ + export interface Schema$ForwardingRuleInfo { + /** + * Name of a Compute Engine forwarding rule. + */ + displayName?: string | null; + /** + * Port range defined in the forwarding rule that matches the test. + */ + matchedPortRange?: string | null; + /** + * Protocol defined in the forwarding rule that matches the test. + */ + matchedProtocol?: string | null; + /** + * Network URI. Only valid for Internal Load Balancer. + */ + networkUri?: string | null; + /** + * Target type of the forwarding rule. + */ + target?: string | null; + /** + * URI of a Compute Engine forwarding rule. + */ + uri?: string | null; + /** + * VIP of the forwarding rule. + */ + vip?: string | null; + } + /** + * For display only. Metadata associated with a Compute Engine instance. + */ + export interface Schema$InstanceInfo { + /** + * Name of a Compute Engine instance. + */ + displayName?: string | null; + /** + * External IP address of the network interface. + */ + externalIp?: string | null; + /** + * Name of the network interface of a Compute Engine instance. + */ + interface?: string | null; + /** + * Internal IP address of the network interface. + */ + internalIp?: string | null; + /** + * Network tags configured on the instance. + */ + networkTags?: string[] | null; + /** + * URI of a Compute Engine network. + */ + networkUri?: string | null; + /** + * Service account authorized for the instance. + */ + serviceAccount?: string | null; + /** + * URI of a Compute Engine instance. + */ + uri?: string | null; + } + /** + * Response for the `ListConnectivityTests` method. + */ + export interface Schema$ListConnectivityTestsResponse { + /** + * Page token to fetch the next set of Connectivity Tests. + */ + nextPageToken?: string | null; + /** + * List of Connectivity Tests. + */ + resources?: Schema$ConnectivityTest[]; + /** + * Locations that could not be reached (when querying all locations with `-`). + */ + unreachable?: string[] | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * For display only. Metadata associated with a specific load balancer backend. + */ + export interface Schema$LoadBalancerBackend { + /** + * Name of a Compute Engine instance or network endpoint. + */ + displayName?: string | null; + /** + * A list of firewall rule URIs allowing probes from health check IP ranges. + */ + healthCheckAllowingFirewallRules?: string[] | null; + /** + * A list of firewall rule URIs blocking probes from health check IP ranges. + */ + healthCheckBlockingFirewallRules?: string[] | null; + /** + * State of the health check firewall configuration. + */ + healthCheckFirewallState?: string | null; + /** + * URI of a Compute Engine instance or network endpoint. + */ + uri?: string | null; + } + /** + * For display only. Metadata associated with a load balancer. + */ + export interface Schema$LoadBalancerInfo { + /** + * Information for the loadbalancer backends. + */ + backends?: Schema$LoadBalancerBackend[]; + /** + * Type of load balancer's backend configuration. + */ + backendType?: string | null; + /** + * Backend configuration URI. + */ + backendUri?: string | null; + /** + * URI of the health check for the load balancer. + */ + healthCheckUri?: string | null; + /** + * Type of the load balancer. + */ + loadBalancerType?: string | null; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * For display only. Metadata associated with a Compute Engine network. + */ + export interface Schema$NetworkInfo { + /** + * Name of a Compute Engine network. + */ + displayName?: string | null; + /** + * The IP range that matches the test. + */ + matchedIpRange?: string | null; + /** + * URI of a Compute Engine network. + */ + uri?: string | null; + } + /** + * 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 | null; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 be a resource name ending with `operations/{unique_id}`. + */ + name?: string | null; + /** + * 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?: {[key: string]: any} | null; + } + /** + * Metadata describing an Operation + */ + export interface Schema$OperationMetadata { + /** + * API version. + */ + apiVersion?: string | null; + /** + * Specifies if cancellation was requested for the operation. + */ + cancelRequested?: boolean | null; + /** + * The time the operation was created. + */ + createTime?: string | null; + /** + * The time the operation finished running. + */ + endTime?: string | null; + /** + * Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * Target of the operation - for example projects/project-1/connectivityTests/test-1 + */ + target?: string | null; + /** + * Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](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`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: 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. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. + */ + version?: number | null; + } + /** + * The details of reachability state from the latest run. + */ + export interface Schema$ReachabilityDetails { + /** + * The details of a failure or a cancellation of reachability analysis. + */ + error?: Schema$Status; + /** + * The overall reachability result of the test. + */ + result?: string | null; + /** + * Result may contain a list of traces if a test has multiple possible paths in the network, such as when destination endpoint is a load balancer with multiple backends. + */ + traces?: Schema$Trace[]; + /** + * The time the reachability state was verified. + */ + verifyTime?: string | null; + } + /** + * Request for the `RerunConnectivityTest` method. + */ + export interface Schema$RerunConnectivityTestRequest {} + /** + * For display only. Metadata associated with a Compute Engine route. + */ + export interface Schema$RouteInfo { + /** + * Destination IP range of the route. + */ + destIpRange?: string | null; + /** + * Name of a Compute Engine route. + */ + displayName?: string | null; + /** + * Instance tags of the route. + */ + instanceTags?: string[] | null; + /** + * URI of a Compute Engine network. + */ + networkUri?: string | null; + /** + * Next hop of the route. + */ + nextHop?: string | null; + /** + * Type of next hop. + */ + nextHopType?: string | null; + /** + * Priority of the route. + */ + priority?: number | null; + /** + * Type of route. + */ + routeType?: string | null; + /** + * URI of a Compute Engine route. Dynamic route from cloud router does not have a URI. Advertised route from Google Cloud VPC to on-premises network also does not have a URI. + */ + uri?: string | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag" This field is only used by Cloud IAM. + */ + updateMask?: string | null; + } + /** + * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * A simulated forwarding path is composed of multiple steps. Each step has a well-defined state and an associated configuration. + */ + export interface Schema$Step { + /** + * Display info of the final state "abort" and reason. + */ + abort?: Schema$AbortInfo; + /** + * This is a step that leads to the final state Drop. + */ + causesDrop?: boolean | null; + /** + * Display info of the final state "deliver" and reason. + */ + deliver?: Schema$DeliverInfo; + /** + * A description of the step. Usually this is a summary of the state. + */ + description?: string | null; + /** + * Display info of the final state "drop" and reason. + */ + drop?: Schema$DropInfo; + /** + * Display info of the source and destination under analysis. The endpiont info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy. + */ + endpoint?: Schema$EndpointInfo; + /** + * Display info of a Compute Engine firewall rule. + */ + firewall?: Schema$FirewallInfo; + /** + * Display info of the final state "forward" and reason. + */ + forward?: Schema$ForwardInfo; + /** + * Display info of a Compute Engine forwarding rule. + */ + forwardingRule?: Schema$ForwardingRuleInfo; + /** + * Display info of a Compute Engine instance. + */ + instance?: Schema$InstanceInfo; + /** + * Display info of the load balancers. + */ + loadBalancer?: Schema$LoadBalancerInfo; + /** + * Display info of a GCP network. + */ + network?: Schema$NetworkInfo; + /** + * Project ID that contains the configuration this step is validating. + */ + projectId?: string | null; + /** + * Display info of a Compute Engine route. + */ + route?: Schema$RouteInfo; + /** + * Each step is in one of the pre-defined states. + */ + state?: string | null; + /** + * Display info of a Compute Engine VPN gateway. + */ + vpnGateway?: Schema$VpnGatewayInfo; + /** + * Display info of a Compute Engine VPN tunnel. + */ + vpnTunnel?: Schema$VpnTunnelInfo; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * Trace represents one simulated packet forwarding path. <ul> <li>Each trace contains multiple ordered steps.</li> <li>Each step is in a particular state and has an associated configuration.</li> <li>State is categorized as a final or non-final state.</li> <li>Each final state has a reason associated with it.</li> <li>Each trace must end with a final state (the last step).</li> </ul> <pre><code> |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) </code></pre> + */ + export interface Schema$Trace { + /** + * Derived from the source and destination endpoints definition, and validated by the data plane model. If there are multiple traces starting from different source locations, then the endpoint_info may be different between traces. + */ + endpointInfo?: Schema$EndpointInfo; + /** + * A trace of a test contains multiple steps from the initial state to the final state (delivered, dropped, forwarded, or aborted). The steps are ordered by the processing sequence within the simulated network state machine. It is critical to preserve the order of the steps and avoid reordering or sorting them. + */ + steps?: Schema$Step[]; + } + /** + * For display only. Metadata associated with a Compute Engine VPN gateway. + */ + export interface Schema$VpnGatewayInfo { + /** + * Name of a VPN gateway. + */ + displayName?: string | null; + /** + * IP address of the VPN gateway. + */ + ipAddress?: string | null; + /** + * URI of a Compute Engine network where the VPN gateway is configured. + */ + networkUri?: string | null; + /** + * Name of a GCP region where this VPN gateway is configured. + */ + region?: string | null; + /** + * URI of a VPN gateway. + */ + uri?: string | null; + /** + * A VPN tunnel that is associated with this VPN gateway. There may be multiple VPN tunnels configured on a VPN gateway, and only the one relevant to the test is displayed. + */ + vpnTunnelUri?: string | null; + } + /** + * For display only. Metadata associated with a Compute Engine VPN tunnel. + */ + export interface Schema$VpnTunnelInfo { + /** + * Name of a VPN tunnel. + */ + displayName?: string | null; + /** + * URI of a Compute Engine network where the VPN tunnel is configured. + */ + networkUri?: string | null; + /** + * Name of a GCP region where this VPN tunnel is configured. + */ + region?: string | null; + /** + * URI of a VPN gateway at remote end of the tunnel. + */ + remoteGateway?: string | null; + /** + * Remote VPN gateway's IP address. + */ + remoteGatewayIp?: string | null; + /** + * Type of the routing policy. + */ + routingType?: string | null; + /** + * URI of the VPN gateway at local end of the tunnel. + */ + sourceGateway?: string | null; + /** + * Local VPN gateway's IP address. + */ + sourceGatewayIp?: string | null; + /** + * URI of a VPN tunnel. + */ + uri?: string | null; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + global: Resource$Projects$Locations$Global; + constructor(context: APIRequestContext) { + this.context = context; + this.global = new Resource$Projects$Locations$Global(this.context); + } + + /** + * networkmanagement.projects.locations.get + * @desc Gets information about a location. + * @alias networkmanagement.projects.locations.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Resource name for the location. + * @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$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.list + * @desc Lists information about the supported locations for this service. + * @alias networkmanagement.projects.locations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The resource that owns the locations collection, if applicable. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Global { + context: APIRequestContext; + connectivityTests: Resource$Projects$Locations$Global$Connectivitytests; + operations: Resource$Projects$Locations$Global$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.connectivityTests = new Resource$Projects$Locations$Global$Connectivitytests( + this.context + ); + this.operations = new Resource$Projects$Locations$Global$Operations( + this.context + ); + } + } + + export class Resource$Projects$Locations$Global$Connectivitytests { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.create + * @desc Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation. + * @alias networkmanagement.projects.locations.global.connectivityTests.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The parent resource of the Connectivity Test to create: `projects/{project_id}/locations/global` + * @param {string=} params.testId Required. The logical name of the Connectivity Test in your project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project + * @param {().ConnectivityTest} params.requestBody 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$Locations$Global$Connectivitytests$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/connectivityTests').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.delete + * @desc Deletes a specific `ConnectivityTest`. + * @alias networkmanagement.projects.locations.global.connectivityTests.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Connectivity Test resource name using the form: `projects/{project_id}/connectivityTests/{test_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$Projects$Locations$Global$Connectivitytests$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Delete + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.get + * @desc Gets the details of a specific Connectivity Test. + * @alias networkmanagement.projects.locations.global.connectivityTests.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. `ConnectivityTest` resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_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$Projects$Locations$Global$Connectivitytests$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.getIamPolicy + * @desc Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @alias networkmanagement.projects.locations.global.connectivityTests.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.options.requestedPolicyVersion Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Connectivitytests$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Getiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.list + * @desc Lists all Connectivity Tests owned by a project. + * @alias networkmanagement.projects.locations.global.connectivityTests.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter Lists the `ConnectivityTests` that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form ` ` where operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = "projects/proj-1/connectivityTests/test-1 - Filter by labels: - Resources that have a key called `foo` labels.foo:* - Resources that have a key called `foo` whose value is `bar` labels.foo = bar + * @param {string=} params.orderBy Field to use to sort the list. + * @param {integer=} params.pageSize Number of `ConnectivityTests` to return. + * @param {string=} params.pageToken Page token from an earlier query, as returned in `next_page_token`. + * @param {string} params.parent Required. The parent resource of the Connectivity Tests: `projects/{project_id}/locations/global` + * @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$Locations$Global$Connectivitytests$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/connectivityTests').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.patch + * @desc Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for for more details. + * @alias networkmanagement.projects.locations.global.connectivityTests.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Unique name of the resource using the form: `projects/{project_id}/tests/{test_id}` + * @param {string=} params.updateMask Required. Mask of fields to update. At least one path must be supplied in this field. + * @param {().ConnectivityTest} params.requestBody 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$Locations$Global$Connectivitytests$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.rerun + * @desc Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. + * @alias networkmanagement.projects.locations.global.connectivityTests.rerun + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Connectivity Test resource name using the form: `projects/{project_id}/connectivityTests/{test_id}` + * @param {().RerunConnectivityTestRequest} params.requestBody 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 + */ + rerun( + params?: Params$Resource$Projects$Locations$Global$Connectivitytests$Rerun, + options?: MethodOptions + ): GaxiosPromise; + rerun( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Rerun, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rerun( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Rerun, + callback: BodyResponseCallback + ): void; + rerun(callback: BodyResponseCallback): void; + rerun( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Rerun + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Rerun; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Rerun; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:rerun').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.setIamPolicy + * @desc Sets the access control policy on the specified resource. Replaces any existing policy. Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED + * @alias networkmanagement.projects.locations.global.connectivityTests.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * @param {().SetIamPolicyRequest} params.requestBody 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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Connectivitytests$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Setiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.connectivityTests.testIamPermissions + * @desc Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @alias networkmanagement.projects.locations.global.connectivityTests.testIamPermissions + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * @param {().TestIamPermissionsRequest} params.requestBody 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 + */ + testIamPermissions( + params?: Params$Resource$Projects$Locations$Global$Connectivitytests$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Connectivitytests$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Connectivitytests$Testiampermissions + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Connectivitytests$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Connectivitytests$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The parent resource of the Connectivity Test to create: `projects/{project_id}/locations/global` + */ + parent?: string; + /** + * Required. The logical name of the Connectivity Test in your project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project + */ + testId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ConnectivityTest; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Connectivity Test resource name using the form: `projects/{project_id}/connectivityTests/{test_id}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. `ConnectivityTest` resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Getiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form ` ` where operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = "projects/proj-1/connectivityTests/test-1 - Filter by labels: - Resources that have a key called `foo` labels.foo:* - Resources that have a key called `foo` whose value is `bar` labels.foo = bar + */ + filter?: string; + /** + * Field to use to sort the list. + */ + orderBy?: string; + /** + * Number of `ConnectivityTests` to return. + */ + pageSize?: number; + /** + * Page token from an earlier query, as returned in `next_page_token`. + */ + pageToken?: string; + /** + * Required. The parent resource of the Connectivity Tests: `projects/{project_id}/locations/global` + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Unique name of the resource using the form: `projects/{project_id}/tests/{test_id}` + */ + name?: string; + /** + * Required. Mask of fields to update. At least one path must be supplied in this field. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ConnectivityTest; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Rerun + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Connectivity Test resource name using the form: `projects/{project_id}/connectivityTests/{test_id}` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RerunConnectivityTestRequest; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Setiampolicy + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Global$Connectivitytests$Testiampermissions + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Global$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * networkmanagement.projects.locations.global.operations.cancel + * @desc Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * @alias networkmanagement.projects.locations.global.operations.cancel + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be cancelled. + * @param {().CancelOperationRequest} params.requestBody 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$Locations$Global$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Global$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Cancel + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.operations.delete + * @desc Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + * @alias networkmanagement.projects.locations.global.operations.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The name of the operation resource to be deleted. + * @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$Locations$Global$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.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 networkmanagement.projects.locations.global.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$Locations$Global$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * networkmanagement.projects.locations.global.operations.list + * @desc Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @alias networkmanagement.projects.locations.global.operations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter The standard list filter. + * @param {string} params.name The name of the operation's parent resource. + * @param {integer=} params.pageSize The standard list page size. + * @param {string=} params.pageToken The standard list page token. + * @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$Locations$Global$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Operations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://networkmanagement.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Operations$Cancel + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Operations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/networkmanagement/webpack.config.js b/src/apis/networkmanagement/webpack.config.js new file mode 100644 index 0000000000..6be51edec0 --- /dev/null +++ b/src/apis/networkmanagement/webpack.config.js @@ -0,0 +1,69 @@ +// Copyright 2019 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. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + }, + output: { + library: 'Networkmanagement', + filename: 'networkmanagement.min.js', + path: path.resolve(__dirname, 'dist'), + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +}; diff --git a/src/apis/oauth2/v2.ts b/src/apis/oauth2/v2.ts index f3057fa6c1..ad9fc8d66a 100644 --- a/src/apis/oauth2/v2.ts +++ b/src/apis/oauth2/v2.ts @@ -98,72 +98,6 @@ export namespace oauth2_v2 { this.userinfo = new Resource$Userinfo(this.context); } - /** - * oauth2.getCertForOpenIdConnect - * @alias oauth2.getCertForOpenIdConnect - * @memberOf! oauth2(v2) - * - * @param {object=} params Parameters for 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 - */ - getCertForOpenIdConnect( - params?: Params$$Getcertforopenidconnect, - options?: MethodOptions - ): GaxiosPromise; - getCertForOpenIdConnect( - params: Params$$Getcertforopenidconnect, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - getCertForOpenIdConnect( - params: Params$$Getcertforopenidconnect, - callback: BodyResponseCallback - ): void; - getCertForOpenIdConnect(callback: BodyResponseCallback): void; - getCertForOpenIdConnect( - paramsOrCallback?: - | Params$$Getcertforopenidconnect - | BodyResponseCallback, - optionsOrCallback?: MethodOptions | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$$Getcertforopenidconnect; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$$Getcertforopenidconnect; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://www.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/oauth2/v2/certs').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', - }, - options - ), - params, - requiredParams: [], - pathParams: [], - context: this.context, - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - /** * oauth2.tokeninfo * @alias oauth2.tokeninfo @@ -239,16 +173,6 @@ export namespace oauth2_v2 { } } - export interface Schema$Jwk { - keys?: Array<{ - alg?: string; - e?: string; - kid?: string; - kty?: string; - n?: string; - use?: string; - }> | null; - } export interface Schema$Tokeninfo { /** * The access type granted with this token. It can be offline or online. @@ -334,12 +258,6 @@ export namespace oauth2_v2 { verified_email?: boolean | null; } - export interface Params$$Getcertforopenidconnect extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - } export interface Params$$Tokeninfo extends StandardParameters { /** * Auth client or API Key for the request diff --git a/src/apis/pubsub/v1.ts b/src/apis/pubsub/v1.ts index bbee198dc7..8f6a28f8b9 100644 --- a/src/apis/pubsub/v1.ts +++ b/src/apis/pubsub/v1.ts @@ -372,7 +372,7 @@ export namespace pubsub_v1 { */ maxMessages?: number | null; /** - * If this field set to true, the system will respond immediately even if it there are no messages available to return in the `Pull` response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. + * Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the `Pull` response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to `true` is discouraged because it adversely impacts the performance of `Pull` operations. We recommend that users do not set this field. */ returnImmediately?: boolean | null; } @@ -4929,7 +4929,7 @@ export namespace pubsub_v1 { * @param {object} params Parameters for request * @param {integer=} params.pageSize Maximum number of snapshot names to return. * @param {string=} params.pageToken The value returned by the last `ListTopicSnapshotsResponse`; indicates that this is a continuation of a prior `ListTopicSnapshots` call, and that the system should return the next page of data. - * @param {string} params.topic The name of the topic that snapshots are attached to. Format is `projects/{project}/topics/{topic}`. + * @param {string} params.topic Required. The name of the topic that snapshots are attached to. Format is `projects/{project}/topics/{topic}`. * @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 @@ -5020,7 +5020,7 @@ export namespace pubsub_v1 { */ pageToken?: string; /** - * The name of the topic that snapshots are attached to. Format is `projects/{project}/topics/{topic}`. + * Required. The name of the topic that snapshots are attached to. Format is `projects/{project}/topics/{topic}`. */ topic?: string; } diff --git a/src/apis/pubsub/v1beta2.ts b/src/apis/pubsub/v1beta2.ts index d1e48c8021..140f7f9286 100644 --- a/src/apis/pubsub/v1beta2.ts +++ b/src/apis/pubsub/v1beta2.ts @@ -309,7 +309,7 @@ export namespace pubsub_v1beta2 { */ maxMessages?: number | null; /** - * If this is specified as true the system will respond immediately even if it is not able to return a message in the `Pull` response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response. + * Optional. If this is specified as true the system will respond immediately even if it is not able to return a message in the `Pull` response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response. Warning: setting this field to `true` is discouraged because it adversely impacts the performance of `Pull` operations. We recommend that users do not set this field. */ returnImmediately?: boolean | null; } diff --git a/src/apis/recommender/v1beta1.ts b/src/apis/recommender/v1beta1.ts index dd20cfe67e..916313f547 100644 --- a/src/apis/recommender/v1beta1.ts +++ b/src/apis/recommender/v1beta1.ts @@ -141,6 +141,90 @@ export namespace recommender_v1beta1 { */ costProjection?: Schema$GoogleCloudRecommenderV1beta1CostProjection; } + /** + * An insight along with the information used to derive the insight. The insight may have associated recomendations as well. + */ + export interface Schema$GoogleCloudRecommenderV1beta1Insight { + /** + * Recommendations derived from this insight. + */ + associatedRecommendations?: Schema$GoogleCloudRecommenderV1beta1InsightRecommendationReference[]; + /** + * Category being targeted by the insight. + */ + category?: string | null; + /** + * A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000" + */ + content?: {[key: string]: any} | null; + /** + * Free-form human readable summary in English. The maximum length is 500 characters. + */ + description?: string | null; + /** + * Fingerprint of the Insight. Provides optimistic locking when updating states. + */ + etag?: string | null; + /** + * Insight subtype. Insight content schema will be stable for a given subtype. + */ + insightSubtype?: string | null; + /** + * Timestamp of the latest data used to generate the insight. + */ + lastRefreshTime?: string | null; + /** + * Name of the insight. * A project insight is represented as projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[insight_id] + */ + name?: string | null; + /** + * Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period). + */ + observationPeriod?: string | null; + /** + * Information state and metadata. + */ + stateInfo?: Schema$GoogleCloudRecommenderV1beta1InsightStateInfo; + /** + * Fully qualified resource names that this insight is targeting. + */ + targetResources?: string[] | null; + } + /** + * Reference to an associated recommendation. + */ + export interface Schema$GoogleCloudRecommenderV1beta1InsightRecommendationReference { + /** + * Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] + */ + recommendation?: string | null; + } + /** + * Information related to insight state. + */ + export interface Schema$GoogleCloudRecommenderV1beta1InsightStateInfo { + /** + * Insight state. + */ + state?: string | null; + /** + * A map of metadata for the state, provided by user or automations systems. + */ + stateMetadata?: {[key: string]: string} | null; + } + /** + * Response to the `ListInsights` method. + */ + export interface Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse { + /** + * The set of insights for the `parent` resource. + */ + insights?: Schema$GoogleCloudRecommenderV1beta1Insight[]; + /** + * A token that can be used to request the next page of results. This field is empty if there are no additional results. + */ + nextPageToken?: string | null; + } /** * Response to the `ListRecommendations` method. */ @@ -154,6 +238,19 @@ export namespace recommender_v1beta1 { */ recommendations?: Schema$GoogleCloudRecommenderV1beta1Recommendation[]; } + /** + * Request for the `MarkInsightAccepted` method. + */ + export interface Schema$GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest { + /** + * Required. Fingerprint of the Insight. Provides optimistic locking. + */ + etag?: string | null; + /** + * Optional. State properties user wish to include with this state. Full replace of the current state_metadata. + */ + stateMetadata?: {[key: string]: string} | null; + } /** * Request for the `MarkRecommendationClaimed` Method. */ @@ -257,6 +354,10 @@ export namespace recommender_v1beta1 { * Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative. */ additionalImpact?: Schema$GoogleCloudRecommenderV1beta1Impact[]; + /** + * Insights that led to this recommendation. + */ + associatedInsights?: Schema$GoogleCloudRecommenderV1beta1RecommendationInsightReference[]; /** * Content of the recommendation describing recommended changes to resources. */ @@ -299,6 +400,15 @@ export namespace recommender_v1beta1 { */ operationGroups?: Schema$GoogleCloudRecommenderV1beta1OperationGroup[]; } + /** + * Reference to an associated insight. + */ + export interface Schema$GoogleCloudRecommenderV1beta1RecommendationInsightReference { + /** + * Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] + */ + insight?: string | null; + } /** * Information for state. Contains state and metadata. */ @@ -350,15 +460,372 @@ export namespace recommender_v1beta1 { export class Resource$Projects$Locations { context: APIRequestContext; + insightTypes: Resource$Projects$Locations$Insighttypes; recommenders: Resource$Projects$Locations$Recommenders; constructor(context: APIRequestContext) { this.context = context; + this.insightTypes = new Resource$Projects$Locations$Insighttypes( + this.context + ); this.recommenders = new Resource$Projects$Locations$Recommenders( this.context ); } } + export class Resource$Projects$Locations$Insighttypes { + context: APIRequestContext; + insights: Resource$Projects$Locations$Insighttypes$Insights; + constructor(context: APIRequestContext) { + this.context = context; + this.insights = new Resource$Projects$Locations$Insighttypes$Insights( + this.context + ); + } + } + + export class Resource$Projects$Locations$Insighttypes$Insights { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * recommender.projects.locations.insightTypes.insights.get + * @desc Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type. + * @alias recommender.projects.locations.insightTypes.insights.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Name of the insight. + * @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$Locations$Insighttypes$Insights$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Insighttypes$Insights$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void; + get( + params: Params$Resource$Projects$Locations$Insighttypes$Insights$Get, + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void; + get( + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Insighttypes$Insights$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Insighttypes$Insights$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Insighttypes$Insights$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://recommender.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * recommender.projects.locations.insightTypes.insights.list + * @desc Lists insights for a Cloud project. Requires the recommender.*.list IAM permission for the specified insight type. + * @alias recommender.projects.locations.insightTypes.insights.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter Optional. Filter expression to restrict the insights returned. Supported filter fields: state Eg: `state:"DISMISSED" or state:"ACTIVE" + * @param {integer=} params.pageSize Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return. + * @param {string=} params.pageToken Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. + * @param {string} params.parent Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ + * @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$Locations$Insighttypes$Insights$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Insighttypes$Insights$List, + options: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + >, + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + > + ): void; + list( + params: Params$Resource$Projects$Locations$Insighttypes$Insights$List, + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + > + ): void; + list( + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + > + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Insighttypes$Insights$List + | BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + >, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + >, + callback?: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + > + ): void | GaxiosPromise< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + > { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Insighttypes$Insights$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Insighttypes$Insights$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://recommender.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/insights').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + >(parameters, callback); + } else { + return createAPIRequest< + Schema$GoogleCloudRecommenderV1beta1ListInsightsResponse + >(parameters); + } + } + + /** + * recommender.projects.locations.insightTypes.insights.markAccepted + * @desc Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight. + * @alias recommender.projects.locations.insightTypes.insights.markAccepted + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Name of the insight. + * @param {().GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest} params.requestBody 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 + */ + markAccepted( + params?: Params$Resource$Projects$Locations$Insighttypes$Insights$Markaccepted, + options?: MethodOptions + ): GaxiosPromise; + markAccepted( + params: Params$Resource$Projects$Locations$Insighttypes$Insights$Markaccepted, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void; + markAccepted( + params: Params$Resource$Projects$Locations$Insighttypes$Insights$Markaccepted, + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void; + markAccepted( + callback: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void; + markAccepted( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Insighttypes$Insights$Markaccepted + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback< + Schema$GoogleCloudRecommenderV1beta1Insight + > + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Insighttypes$Insights$Markaccepted; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Insighttypes$Insights$Markaccepted; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://recommender.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:markAccepted').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Insighttypes$Insights$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Name of the insight. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Insighttypes$Insights$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Optional. Filter expression to restrict the insights returned. Supported filter fields: state Eg: `state:"DISMISSED" or state:"ACTIVE" + */ + filter?: string; + /** + * Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return. + */ + pageSize?: number; + /** + * Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. + */ + pageToken?: string; + /** + * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Insighttypes$Insights$Markaccepted + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Name of the insight. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest; + } + export class Resource$Projects$Locations$Recommenders { context: APIRequestContext; recommendations: Resource$Projects$Locations$Recommenders$Recommendations; diff --git a/src/apis/remotebuildexecution/v1.ts b/src/apis/remotebuildexecution/v1.ts index bde816fd8f..3f51aaac99 100644 --- a/src/apis/remotebuildexecution/v1.ts +++ b/src/apis/remotebuildexecution/v1.ts @@ -135,6 +135,10 @@ export namespace remotebuildexecution_v1 { * The digest of the root Directory for the input files. The files in the directory tree are available in the correct location on the build machine before the command is executed. The root directory, as well as every subdirectory and content blob referred to, MUST be in the ContentAddressableStorage. */ inputRootDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * List of required supported NodeProperty keys. In order to ensure that equivalent `Action`s always hash to the same value, the supported node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of these properties is server-dependent. If a property is not recognized by the server, the server will return an `INVALID_ARGUMENT` error. + */ + outputNodeProperties?: string[] | null; /** * A timeout after which the execution should be killed. If the timeout is absent, then the client is specifying that the execution should continue as long as the server will let it. The server SHOULD impose a timeout if the client does not specify one, however, if the client does specify a timeout that is longer than the server's maximum timeout, the server MUST reject the request. The timeout is a part of the Action message, and therefore two `Actions` with different timeouts are different, even if they are otherwise identical. This is because, if they were not, running an `Action` with a lower timeout than is required might result in a cache hit from an execution run with a longer timeout, hiding the fact that the timeout is too short. By encoding it directly in the `Action`, a lower timeout will result in a cache miss and the execution timeout will fail immediately, rather than whenever the cache entry gets evicted. */ @@ -153,21 +157,25 @@ export namespace remotebuildexecution_v1 { */ exitCode?: number | null; /** - * The output directories of the action. For each output directory requested in the `output_directories` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: "a/b/dir" tree_digest: { hash: "4a73bc9d03...", size: 55 } } // Tree proto with hash "4a73bc9d03..." and size 55: { root: { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } children : { // (Directory proto with hash "4cf2eda940..." and size 43) files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name was found, but was not a directory, the server will return a FAILED_PRECONDITION. + * The output directories of the action. For each output directory requested in the `output_directories` or `output_paths` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: "a/b/dir" tree_digest: { hash: "4a73bc9d03...", size: 55 } } // Tree proto with hash "4a73bc9d03..." and size 55: { root: { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } children : { // (Directory proto with hash "4cf2eda940..." and size 43) files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name as listed in `output_files` of the Command was found in `output_directories`, but was not a directory, the server will return a FAILED_PRECONDITION. */ outputDirectories?: Schema$BuildBazelRemoteExecutionV2OutputDirectory[]; /** - * The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`. */ outputDirectorySymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; /** - * The output files of the action. For each output file requested in the `output_files` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file. If an output of the same name was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output files of the action. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file (`output_symlinks` field after v2.1). If an output listed in `output_files` was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. */ outputFiles?: Schema$BuildBazelRemoteExecutionV2OutputFile[]; /** - * The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name as listed in `output_files` of the Command was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`. */ outputFileSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; + /** + * New in v2.1: this field will only be populated if the command `output_paths` field was used, and not the pre v2.1 `output_files` or `output_directories` fields. The output paths of the action that are symbolic links to other paths. Those may be links to other outputs, or inputs, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. A single entry for each output requested in `output_paths` field of the Action, if the corresponding path existed after the action completed and was a symbolic link. If the action does not produce a requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + */ + outputSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; /** * The digest for a blob containing the standard error of the action, which can be retrieved from the ContentAddressableStorage. */ @@ -198,13 +206,17 @@ export namespace remotebuildexecution_v1 { */ environmentVariables?: Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]; /** - * A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. + * A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use `output_paths` instead. */ outputDirectories?: string[] | null; /** - * A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. + * A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use `output_paths` instead. */ outputFiles?: string[] | null; + /** + * A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED `output_files` and `output_directories` fields. If `output_paths` is used, `output_files` and `output_directories` will be ignored! + */ + outputPaths?: string[] | null; /** * The platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. */ @@ -228,7 +240,7 @@ export namespace remotebuildexecution_v1 { value?: string | null; } /** - * A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server, but servers SHOULD use SHA-256. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. + * A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. */ export interface Schema$BuildBazelRemoteExecutionV2Digest { /** @@ -241,7 +253,7 @@ export namespace remotebuildexecution_v1 { sizeBytes?: string | null; } /** - * A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } // (Directory proto with hash "4cf2eda940..." and size 43) { files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } ``` + * A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. * The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 }, node_properties: [ { "name": "MTime", "value": "2017-01-15T01:30:15.01Z" } ] } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } // (Directory proto with hash "4cf2eda940..." and size 43) { files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } ``` */ export interface Schema$BuildBazelRemoteExecutionV2Directory { /** @@ -252,6 +264,10 @@ export namespace remotebuildexecution_v1 { * The files in the directory. */ files?: Schema$BuildBazelRemoteExecutionV2FileNode[]; + /** + * The node properties of the Directory. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The symlinks in the directory. */ @@ -379,6 +395,10 @@ export namespace remotebuildexecution_v1 { * The name of the file. */ name?: string | null; + /** + * The node properties of the FileNode. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; } /** * A `LogFile` is a log stored in the CAS. @@ -393,6 +413,19 @@ export namespace remotebuildexecution_v1 { */ humanReadable?: boolean | null; } + /** + * A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times. + */ + export interface Schema$BuildBazelRemoteExecutionV2NodeProperty { + /** + * The property name. + */ + name?: string | null; + /** + * The property value. + */ + value?: string | null; + } /** * An `OutputDirectory` is the output in an `ActionResult` corresponding to a directory's full contents rather than a single file. */ @@ -422,6 +455,10 @@ export namespace remotebuildexecution_v1 { * True if file is executable, false otherwise. */ isExecutable?: boolean | null; + /** + * The supported node properties of the OutputFile, if requested by the Action. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The full path of the file relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. */ @@ -431,6 +468,10 @@ export namespace remotebuildexecution_v1 { * An `OutputSymlink` is similar to a Symlink, but it is used as an output in an `ActionResult`. `OutputSymlink` is binary-compatible with `SymlinkNode`. */ export interface Schema$BuildBazelRemoteExecutionV2OutputSymlink { + /** + * The supported node properties of the OutputSymlink, if requested by the Action. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The full path of the symlink relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. */ @@ -491,6 +532,10 @@ export namespace remotebuildexecution_v1 { * The name of the symlink. */ name?: string | null; + /** + * The node properties of the SymlinkNode. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. The canonical form forbids the substrings `/./` and `//` in the target path. `..` components are allowed anywhere in the target path. */ diff --git a/src/apis/remotebuildexecution/v1alpha.ts b/src/apis/remotebuildexecution/v1alpha.ts index 6dd91f8917..570dcdf327 100644 --- a/src/apis/remotebuildexecution/v1alpha.ts +++ b/src/apis/remotebuildexecution/v1alpha.ts @@ -131,6 +131,10 @@ export namespace remotebuildexecution_v1alpha { * The digest of the root Directory for the input files. The files in the directory tree are available in the correct location on the build machine before the command is executed. The root directory, as well as every subdirectory and content blob referred to, MUST be in the ContentAddressableStorage. */ inputRootDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * List of required supported NodeProperty keys. In order to ensure that equivalent `Action`s always hash to the same value, the supported node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of these properties is server-dependent. If a property is not recognized by the server, the server will return an `INVALID_ARGUMENT` error. + */ + outputNodeProperties?: string[] | null; /** * A timeout after which the execution should be killed. If the timeout is absent, then the client is specifying that the execution should continue as long as the server will let it. The server SHOULD impose a timeout if the client does not specify one, however, if the client does specify a timeout that is longer than the server's maximum timeout, the server MUST reject the request. The timeout is a part of the Action message, and therefore two `Actions` with different timeouts are different, even if they are otherwise identical. This is because, if they were not, running an `Action` with a lower timeout than is required might result in a cache hit from an execution run with a longer timeout, hiding the fact that the timeout is too short. By encoding it directly in the `Action`, a lower timeout will result in a cache miss and the execution timeout will fail immediately, rather than whenever the cache entry gets evicted. */ @@ -149,21 +153,25 @@ export namespace remotebuildexecution_v1alpha { */ exitCode?: number | null; /** - * The output directories of the action. For each output directory requested in the `output_directories` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: "a/b/dir" tree_digest: { hash: "4a73bc9d03...", size: 55 } } // Tree proto with hash "4a73bc9d03..." and size 55: { root: { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } children : { // (Directory proto with hash "4cf2eda940..." and size 43) files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name was found, but was not a directory, the server will return a FAILED_PRECONDITION. + * The output directories of the action. For each output directory requested in the `output_directories` or `output_paths` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: "a/b/dir" tree_digest: { hash: "4a73bc9d03...", size: 55 } } // Tree proto with hash "4a73bc9d03..." and size 55: { root: { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } children : { // (Directory proto with hash "4cf2eda940..." and size 43) files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name as listed in `output_files` of the Command was found in `output_directories`, but was not a directory, the server will return a FAILED_PRECONDITION. */ outputDirectories?: Schema$BuildBazelRemoteExecutionV2OutputDirectory[]; /** - * The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`. */ outputDirectorySymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; /** - * The output files of the action. For each output file requested in the `output_files` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file. If an output of the same name was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output files of the action. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file (`output_symlinks` field after v2.1). If an output listed in `output_files` was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. */ outputFiles?: Schema$BuildBazelRemoteExecutionV2OutputFile[]; /** - * The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name as listed in `output_files` of the Command was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`. */ outputFileSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; + /** + * New in v2.1: this field will only be populated if the command `output_paths` field was used, and not the pre v2.1 `output_files` or `output_directories` fields. The output paths of the action that are symbolic links to other paths. Those may be links to other outputs, or inputs, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. A single entry for each output requested in `output_paths` field of the Action, if the corresponding path existed after the action completed and was a symbolic link. If the action does not produce a requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + */ + outputSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; /** * The digest for a blob containing the standard error of the action, which can be retrieved from the ContentAddressableStorage. */ @@ -194,13 +202,17 @@ export namespace remotebuildexecution_v1alpha { */ environmentVariables?: Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]; /** - * A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. + * A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use `output_paths` instead. */ outputDirectories?: string[] | null; /** - * A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. + * A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use `output_paths` instead. */ outputFiles?: string[] | null; + /** + * A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED `output_files` and `output_directories` fields. If `output_paths` is used, `output_files` and `output_directories` will be ignored! + */ + outputPaths?: string[] | null; /** * The platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. */ @@ -224,7 +236,7 @@ export namespace remotebuildexecution_v1alpha { value?: string | null; } /** - * A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server, but servers SHOULD use SHA-256. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. + * A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. */ export interface Schema$BuildBazelRemoteExecutionV2Digest { /** @@ -237,7 +249,7 @@ export namespace remotebuildexecution_v1alpha { sizeBytes?: string | null; } /** - * A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } // (Directory proto with hash "4cf2eda940..." and size 43) { files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } ``` + * A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. * The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 }, node_properties: [ { "name": "MTime", "value": "2017-01-15T01:30:15.01Z" } ] } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } // (Directory proto with hash "4cf2eda940..." and size 43) { files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } ``` */ export interface Schema$BuildBazelRemoteExecutionV2Directory { /** @@ -248,6 +260,10 @@ export namespace remotebuildexecution_v1alpha { * The files in the directory. */ files?: Schema$BuildBazelRemoteExecutionV2FileNode[]; + /** + * The node properties of the Directory. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The symlinks in the directory. */ @@ -375,6 +391,10 @@ export namespace remotebuildexecution_v1alpha { * The name of the file. */ name?: string | null; + /** + * The node properties of the FileNode. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; } /** * A `LogFile` is a log stored in the CAS. @@ -389,6 +409,19 @@ export namespace remotebuildexecution_v1alpha { */ humanReadable?: boolean | null; } + /** + * A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times. + */ + export interface Schema$BuildBazelRemoteExecutionV2NodeProperty { + /** + * The property name. + */ + name?: string | null; + /** + * The property value. + */ + value?: string | null; + } /** * An `OutputDirectory` is the output in an `ActionResult` corresponding to a directory's full contents rather than a single file. */ @@ -418,6 +451,10 @@ export namespace remotebuildexecution_v1alpha { * True if file is executable, false otherwise. */ isExecutable?: boolean | null; + /** + * The supported node properties of the OutputFile, if requested by the Action. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The full path of the file relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. */ @@ -427,6 +464,10 @@ export namespace remotebuildexecution_v1alpha { * An `OutputSymlink` is similar to a Symlink, but it is used as an output in an `ActionResult`. `OutputSymlink` is binary-compatible with `SymlinkNode`. */ export interface Schema$BuildBazelRemoteExecutionV2OutputSymlink { + /** + * The supported node properties of the OutputSymlink, if requested by the Action. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The full path of the symlink relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. */ @@ -487,6 +528,10 @@ export namespace remotebuildexecution_v1alpha { * The name of the symlink. */ name?: string | null; + /** + * The node properties of the SymlinkNode. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. The canonical form forbids the substrings `/./` and `//` in the target path. `..` components are allowed anywhere in the target path. */ diff --git a/src/apis/remotebuildexecution/v2.ts b/src/apis/remotebuildexecution/v2.ts index 456ce1aa76..8c6fbfeb72 100644 --- a/src/apis/remotebuildexecution/v2.ts +++ b/src/apis/remotebuildexecution/v2.ts @@ -139,6 +139,10 @@ export namespace remotebuildexecution_v2 { * The digest of the root Directory for the input files. The files in the directory tree are available in the correct location on the build machine before the command is executed. The root directory, as well as every subdirectory and content blob referred to, MUST be in the ContentAddressableStorage. */ inputRootDigest?: Schema$BuildBazelRemoteExecutionV2Digest; + /** + * List of required supported NodeProperty keys. In order to ensure that equivalent `Action`s always hash to the same value, the supported node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of these properties is server-dependent. If a property is not recognized by the server, the server will return an `INVALID_ARGUMENT` error. + */ + outputNodeProperties?: string[] | null; /** * A timeout after which the execution should be killed. If the timeout is absent, then the client is specifying that the execution should continue as long as the server will let it. The server SHOULD impose a timeout if the client does not specify one, however, if the client does specify a timeout that is longer than the server's maximum timeout, the server MUST reject the request. The timeout is a part of the Action message, and therefore two `Actions` with different timeouts are different, even if they are otherwise identical. This is because, if they were not, running an `Action` with a lower timeout than is required might result in a cache hit from an execution run with a longer timeout, hiding the fact that the timeout is too short. By encoding it directly in the `Action`, a lower timeout will result in a cache miss and the execution timeout will fail immediately, rather than whenever the cache entry gets evicted. */ @@ -163,21 +167,25 @@ export namespace remotebuildexecution_v2 { */ exitCode?: number | null; /** - * The output directories of the action. For each output directory requested in the `output_directories` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: "a/b/dir" tree_digest: { hash: "4a73bc9d03...", size: 55 } } // Tree proto with hash "4a73bc9d03..." and size 55: { root: { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } children : { // (Directory proto with hash "4cf2eda940..." and size 43) files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name was found, but was not a directory, the server will return a FAILED_PRECONDITION. + * The output directories of the action. For each output directory requested in the `output_directories` or `output_paths` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: "a/b/dir" tree_digest: { hash: "4a73bc9d03...", size: 55 } } // Tree proto with hash "4a73bc9d03..." and size 55: { root: { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } children : { // (Directory proto with hash "4cf2eda940..." and size 43) files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name as listed in `output_files` of the Command was found in `output_directories`, but was not a directory, the server will return a FAILED_PRECONDITION. */ outputDirectories?: Schema$BuildBazelRemoteExecutionV2OutputDirectory[]; /** - * The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`. */ outputDirectorySymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; /** - * The output files of the action. For each output file requested in the `output_files` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file. If an output of the same name was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output files of the action. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file (`output_symlinks` field after v2.1). If an output listed in `output_files` was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. */ outputFiles?: Schema$BuildBazelRemoteExecutionV2OutputFile[]; /** - * The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + * The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name as listed in `output_files` of the Command was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`. */ outputFileSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; + /** + * New in v2.1: this field will only be populated if the command `output_paths` field was used, and not the pre v2.1 `output_files` or `output_directories` fields. The output paths of the action that are symbolic links to other paths. Those may be links to other outputs, or inputs, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. A single entry for each output requested in `output_paths` field of the Action, if the corresponding path existed after the action completed and was a symbolic link. If the action does not produce a requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. + */ + outputSymlinks?: Schema$BuildBazelRemoteExecutionV2OutputSymlink[]; /** * The digest for a blob containing the standard error of the action, which can be retrieved from the ContentAddressableStorage. */ @@ -312,13 +320,17 @@ export namespace remotebuildexecution_v2 { */ environmentVariables?: Schema$BuildBazelRemoteExecutionV2CommandEnvironmentVariable[]; /** - * A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. + * A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use `output_paths` instead. */ outputDirectories?: string[] | null; /** - * A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. + * A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use `output_paths` instead. */ outputFiles?: string[] | null; + /** + * A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED `output_files` and `output_directories` fields. If `output_paths` is used, `output_files` and `output_directories` will be ignored! + */ + outputPaths?: string[] | null; /** * The platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. */ @@ -342,7 +354,7 @@ export namespace remotebuildexecution_v2 { value?: string | null; } /** - * A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server, but servers SHOULD use SHA-256. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. + * A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. */ export interface Schema$BuildBazelRemoteExecutionV2Digest { /** @@ -355,7 +367,7 @@ export namespace remotebuildexecution_v2 { sizeBytes?: string | null; } /** - * A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } // (Directory proto with hash "4cf2eda940..." and size 43) { files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } ``` + * A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. * The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 }, node_properties: [ { "name": "MTime", "value": "2017-01-15T01:30:15.01Z" } ] } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } // (Directory proto with hash "4cf2eda940..." and size 43) { files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } ``` */ export interface Schema$BuildBazelRemoteExecutionV2Directory { /** @@ -366,6 +378,10 @@ export namespace remotebuildexecution_v2 { * The files in the directory. */ files?: Schema$BuildBazelRemoteExecutionV2FileNode[]; + /** + * The node properties of the Directory. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The symlinks in the directory. */ @@ -514,6 +530,10 @@ export namespace remotebuildexecution_v2 { * Supported execution priority range. */ executionPriorityCapabilities?: Schema$BuildBazelRemoteExecutionV2PriorityCapabilities; + /** + * Supported node properties. + */ + supportedNodeProperties?: string[] | null; } /** * An `ExecutionPolicy` can be used to control the scheduling of the action. @@ -540,6 +560,10 @@ export namespace remotebuildexecution_v2 { * The name of the file. */ name?: string | null; + /** + * The node properties of the FileNode. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; } /** * A request message for ContentAddressableStorage.FindMissingBlobs. @@ -585,6 +609,19 @@ export namespace remotebuildexecution_v2 { */ humanReadable?: boolean | null; } + /** + * A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times. + */ + export interface Schema$BuildBazelRemoteExecutionV2NodeProperty { + /** + * The property name. + */ + name?: string | null; + /** + * The property value. + */ + value?: string | null; + } /** * An `OutputDirectory` is the output in an `ActionResult` corresponding to a directory's full contents rather than a single file. */ @@ -614,6 +651,10 @@ export namespace remotebuildexecution_v2 { * True if file is executable, false otherwise. */ isExecutable?: boolean | null; + /** + * The supported node properties of the OutputFile, if requested by the Action. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The full path of the file relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. */ @@ -623,6 +664,10 @@ export namespace remotebuildexecution_v2 { * An `OutputSymlink` is similar to a Symlink, but it is used as an output in an `ActionResult`. `OutputSymlink` is binary-compatible with `SymlinkNode`. */ export interface Schema$BuildBazelRemoteExecutionV2OutputSymlink { + /** + * The supported node properties of the OutputSymlink, if requested by the Action. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The full path of the symlink relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. */ @@ -730,6 +775,10 @@ export namespace remotebuildexecution_v2 { * The name of the symlink. */ name?: string | null; + /** + * The node properties of the SymlinkNode. + */ + nodeProperties?: Schema$BuildBazelRemoteExecutionV2NodeProperty[]; /** * The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. The canonical form forbids the substrings `/./` and `//` in the target path. `..` components are allowed anywhere in the target path. */ @@ -1957,7 +2006,7 @@ export namespace remotebuildexecution_v2 { /** * remotebuildexecution.blobs.findMissing - * @desc Determine if blobs are present in the CAS. Clients can use this API before uploading blobs to determine which ones are already present in the CAS and do not need to be uploaded again. There are no method-specific errors. + * @desc Determine if blobs are present in the CAS. Clients can use this API before uploading blobs to determine which ones are already present in the CAS and do not need to be uploaded again. Servers SHOULD increase the TTLs of the referenced blobs if necessary and applicable. There are no method-specific errors. * @alias remotebuildexecution.blobs.findMissing * @memberOf! () * @@ -2059,7 +2108,7 @@ export namespace remotebuildexecution_v2 { /** * remotebuildexecution.blobs.getTree - * @desc Fetch the entire directory tree rooted at a node. This request must be targeted at a Directory stored in the ContentAddressableStorage (CAS). The server will enumerate the `Directory` tree recursively and return every node descended from the root. The GetTreeRequest.page_token parameter can be used to skip ahead in the stream (e.g. when retrying a partially completed and aborted request), by setting it to a value taken from GetTreeResponse.next_page_token of the last successfully processed GetTreeResponse). The exact traversal order is unspecified and, unless retrieving subsequent pages from an earlier request, is not guaranteed to be stable across multiple invocations of `GetTree`. If part of the tree is missing from the CAS, the server will return the portion present and omit the rest. * `NOT_FOUND`: The requested tree root is not present in the CAS. + * @desc Fetch the entire directory tree rooted at a node. This request must be targeted at a Directory stored in the ContentAddressableStorage (CAS). The server will enumerate the `Directory` tree recursively and return every node descended from the root. The GetTreeRequest.page_token parameter can be used to skip ahead in the stream (e.g. when retrying a partially completed and aborted request), by setting it to a value taken from GetTreeResponse.next_page_token of the last successfully processed GetTreeResponse). The exact traversal order is unspecified and, unless retrieving subsequent pages from an earlier request, is not guaranteed to be stable across multiple invocations of `GetTree`. If part of the tree is missing from the CAS, the server will return the portion present and omit the rest. Errors: * `NOT_FOUND`: The requested tree root is not present in the CAS. * @alias remotebuildexecution.blobs.getTree * @memberOf! () * @@ -2067,7 +2116,7 @@ export namespace remotebuildexecution_v2 { * @param {string} params.hash The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long. * @param {string} params.instanceName The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted. * @param {integer=} params.pageSize A maximum page size to request. If present, the server will request no more than this many items. Regardless of whether a page size is specified, the server may place its own limit on the number of items to be returned and require the client to retrieve more items using a subsequent request. - * @param {string=} params.pageToken A page token, which must be a value received in a previous GetTreeResponse. If present, the server will use it to return the following page of results. + * @param {string=} params.pageToken A page token, which must be a value received in a previous GetTreeResponse. If present, the server will use that token as an offset, returning only that page and the ones that succeed it. * @param {string} params.sizeBytes The size of the blob, in bytes. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2227,7 +2276,7 @@ export namespace remotebuildexecution_v2 { */ pageSize?: number; /** - * A page token, which must be a value received in a previous GetTreeResponse. If present, the server will use it to return the following page of results. + * A page token, which must be a value received in a previous GetTreeResponse. If present, the server will use that token as an offset, returning only that page and the ones that succeed it. */ pageToken?: string; /** diff --git a/src/apis/run/v1.ts b/src/apis/run/v1.ts index 75351bf959..9c31eb2b58 100644 --- a/src/apis/run/v1.ts +++ b/src/apis/run/v1.ts @@ -834,6 +834,41 @@ export namespace run_v1 { */ name?: string | null; } + /** + * Cloud Run fully managed: not supported Cloud Run on GKE: supported Namespace provides a scope for Names. Use of multiple namespaces is optional. + */ + export interface Schema$Namespace { + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + */ + metadata?: Schema$ObjectMeta; + /** + * Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + spec?: Schema$NamespaceSpec; + /** + * Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + status?: Schema$NamespaceStatus; + } + /** + * Cloud Run fully managed: not supported Cloud Run on GKE: supported NamespaceSpec describes the attributes on a Namespace. + */ + export interface Schema$NamespaceSpec { + /** + * Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + */ + finalizers?: string[] | null; + } + /** + * Cloud Run fully managed: not supported Cloud Run on GKE: supported NamespaceStatus is information about the current status of a Namespace. + */ + export interface Schema$NamespaceStatus { + /** + * Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + */ + phase?: string | null; + } /** * k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. */ @@ -1524,6 +1559,184 @@ export namespace run_v1 { this.context = context; this.secrets = new Resource$Api$V1$Namespaces$Secrets(this.context); } + + /** + * run.api.v1.namespaces.get + * @desc Rpc to get information about a namespace. + * @alias run.api.v1.namespaces.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project 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$Api$V1$Namespaces$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Api$V1$Namespaces$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Api$V1$Namespaces$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Api$V1$Namespaces$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Api$V1$Namespaces$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Api$V1$Namespaces$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://run.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/api/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * run.api.v1.namespaces.patch + * @desc Rpc to update a namespace. + * @alias run.api.v1.namespaces.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project ID. + * @param {string=} params.updateMask Required. Indicates which fields in the provided namespace to update. This field is currently unused. + * @param {().Namespace} params.requestBody 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$Api$V1$Namespaces$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Api$V1$Namespaces$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Api$V1$Namespaces$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Api$V1$Namespaces$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Api$V1$Namespaces$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Api$V1$Namespaces$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://run.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/api/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Api$V1$Namespaces$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project ID. + */ + name?: string; + } + export interface Params$Resource$Api$V1$Namespaces$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project ID. + */ + name?: string; + /** + * Required. Indicates which fields in the provided namespace to update. This field is currently unused. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Namespace; } export class Resource$Api$V1$Namespaces$Secrets { @@ -3593,6 +3806,7 @@ export namespace run_v1 { authorizeddomains: Resource$Projects$Locations$Authorizeddomains; configurations: Resource$Projects$Locations$Configurations; domainmappings: Resource$Projects$Locations$Domainmappings; + namespaces: Resource$Projects$Locations$Namespaces; revisions: Resource$Projects$Locations$Revisions; routes: Resource$Projects$Locations$Routes; secrets: Resource$Projects$Locations$Secrets; @@ -3608,6 +3822,9 @@ export namespace run_v1 { this.domainmappings = new Resource$Projects$Locations$Domainmappings( this.context ); + this.namespaces = new Resource$Projects$Locations$Namespaces( + this.context + ); this.revisions = new Resource$Projects$Locations$Revisions(this.context); this.routes = new Resource$Projects$Locations$Routes(this.context); this.secrets = new Resource$Projects$Locations$Secrets(this.context); @@ -4458,6 +4675,191 @@ export namespace run_v1 { watch?: boolean; } + export class Resource$Projects$Locations$Namespaces { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * run.projects.locations.namespaces.get + * @desc Rpc to get information about a namespace. + * @alias run.projects.locations.namespaces.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project 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$Projects$Locations$Namespaces$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Namespaces$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Namespaces$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Namespaces$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Namespaces$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Namespaces$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://run.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * run.projects.locations.namespaces.patch + * @desc Rpc to update a namespace. + * @alias run.projects.locations.namespaces.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project ID. + * @param {string=} params.updateMask Required. Indicates which fields in the provided namespace to update. This field is currently unused. + * @param {().Namespace} params.requestBody 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$Locations$Namespaces$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Namespaces$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Namespaces$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Namespaces$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Namespaces$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Namespaces$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://run.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Namespaces$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project ID. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Namespaces$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the namespace being retrieved. If needed, replace {namespace_id} with the project ID. + */ + name?: string; + /** + * Required. Indicates which fields in the provided namespace to update. This field is currently unused. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Namespace; + } + export class Resource$Projects$Locations$Revisions { context: APIRequestContext; constructor(context: APIRequestContext) { diff --git a/src/apis/secretmanager/README.md b/src/apis/secretmanager/README.md index 8630163eab..1e07b9b022 100644 --- a/src/apis/secretmanager/README.md +++ b/src/apis/secretmanager/README.md @@ -2,7 +2,7 @@ # secretmanager -> Stores and manages access to application secrets. Provides convenience while improving security. +> Stores API keys, passwords, certificates, and other sensitive data. Provides convenience while improving security. ## Installation diff --git a/src/apis/securitycenter/v1.ts b/src/apis/securitycenter/v1.ts index ca44c323e8..2465f8c16d 100644 --- a/src/apis/securitycenter/v1.ts +++ b/src/apis/securitycenter/v1.ts @@ -305,6 +305,19 @@ export namespace securitycenter_v1 { */ state?: string | null; } + /** + * Cloud SCC's Notification + */ + export interface Schema$GoogleCloudSecuritycenterV1NotificationMessage { + /** + * If it's a Finding based notification config, this field will be populated. + */ + finding?: Schema$Finding; + /** + * Name of the notification config that generated current notification. + */ + notificationConfigName?: string | null; + } /** * Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud Platform (GCP) resource. The Asset is a Cloud SCC resource that captures information about a single GCP resource. All modifications to an Asset are only within the context of Cloud SCC and don't affect the referenced GCP resource. */ @@ -553,7 +566,7 @@ export namespace securitycenter_v1 { */ export interface Schema$GroupFindingsRequest { /** - * When compare_duration is set, the GroupResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding was not present at the start of compare_duration, but was present at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. If this field is set then `state_change` must be a specified field in `group_by`. + * When compare_duration is set, the GroupResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. If this field is set then `state_change` must be a specified field in `group_by`. */ compareDuration?: string | null; /** @@ -692,6 +705,19 @@ export namespace securitycenter_v1 { */ stateChange?: string | null; } + /** + * Response message for listing notification configs. + */ + export interface Schema$ListNotificationConfigsResponse { + /** + * Token to retrieve the next page of results, or empty if there are no more results. + */ + nextPageToken?: string | null; + /** + * Notification configs belonging to the requested parent. + */ + notificationConfigs?: Schema$NotificationConfig[]; + } /** * The response message for Operations.ListOperations. */ @@ -718,6 +744,31 @@ export namespace securitycenter_v1 { */ sources?: Schema$Source[]; } + /** + * Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc. + */ + export interface Schema$NotificationConfig { + /** + * The description of the notification config (max of 1024 characters). + */ + description?: string | null; + /** + * The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + */ + name?: string | null; + /** + * The PubSub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]". + */ + pubsubTopic?: string | null; + /** + * Output only. The service account that needs "pubsub.topics.publish" permission to publish to the PubSub topic. + */ + serviceAccount?: string | null; + /** + * The config for triggering streaming-based notifications. + */ + streamingConfig?: Schema$StreamingConfig; + } /** * This resource represents a long-running operation that is the result of a network API call. */ @@ -920,6 +971,15 @@ export namespace securitycenter_v1 { */ message?: string | null; } + /** + * The config for streaming-based notifications, which send each event as soon as it is detected. + */ + export interface Schema$StreamingConfig { + /** + * Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form `<field> <operator> <value>` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. + */ + filter?: string | null; + } /** * Request message for `TestIamPermissions` method. */ @@ -942,11 +1002,15 @@ export namespace securitycenter_v1 { export class Resource$Organizations { context: APIRequestContext; assets: Resource$Organizations$Assets; + notificationConfigs: Resource$Organizations$Notificationconfigs; operations: Resource$Organizations$Operations; sources: Resource$Organizations$Sources; constructor(context: APIRequestContext) { this.context = context; this.assets = new Resource$Organizations$Assets(this.context); + this.notificationConfigs = new Resource$Organizations$Notificationconfigs( + this.context + ); this.operations = new Resource$Organizations$Operations(this.context); this.sources = new Resource$Organizations$Sources(this.context); } @@ -1889,6 +1953,479 @@ export namespace securitycenter_v1 { requestBody?: Schema$SecurityMarks; } + export class Resource$Organizations$Notificationconfigs { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * securitycenter.organizations.notificationConfigs.create + * @desc Creates a notification config. + * @alias securitycenter.organizations.notificationConfigs.create + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.configId Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contains alphanumeric characters, underscores or hyphens only. + * @param {string} params.parent Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]". + * @param {().NotificationConfig} params.requestBody 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$Organizations$Notificationconfigs$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Organizations$Notificationconfigs$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Organizations$Notificationconfigs$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Organizations$Notificationconfigs$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Notificationconfigs$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Notificationconfigs$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://securitycenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/notificationConfigs').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * securitycenter.organizations.notificationConfigs.delete + * @desc Deletes a notification config. + * @alias securitycenter.organizations.notificationConfigs.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_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$Organizations$Notificationconfigs$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Organizations$Notificationconfigs$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Organizations$Notificationconfigs$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Organizations$Notificationconfigs$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Notificationconfigs$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Notificationconfigs$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://securitycenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * securitycenter.organizations.notificationConfigs.get + * @desc Gets a notification config. + * @alias securitycenter.organizations.notificationConfigs.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_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$Organizations$Notificationconfigs$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Organizations$Notificationconfigs$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Organizations$Notificationconfigs$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Organizations$Notificationconfigs$Get + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Notificationconfigs$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Notificationconfigs$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://securitycenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * securitycenter.organizations.notificationConfigs.list + * @desc Lists notification configs. + * @alias securitycenter.organizations.notificationConfigs.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {integer=} params.pageSize The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * @param {string=} params.pageToken The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data. + * @param {string} params.parent Required. Name of the organization to list notification configs. Its format is "organizations/[organization_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$Organizations$Notificationconfigs$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Organizations$Notificationconfigs$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Notificationconfigs$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Organizations$Notificationconfigs$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Notificationconfigs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Notificationconfigs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://securitycenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/notificationConfigs').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * securitycenter.organizations.notificationConfigs.patch + * @desc Updates a notification config. + * @alias securitycenter.organizations.notificationConfigs.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + * @param {string=} params.updateMask The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. + * @param {().NotificationConfig} params.requestBody 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$Organizations$Notificationconfigs$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Organizations$Notificationconfigs$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Organizations$Notificationconfigs$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Organizations$Notificationconfigs$Patch + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Notificationconfigs$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Notificationconfigs$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://securitycenter.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Organizations$Notificationconfigs$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contains alphanumeric characters, underscores or hyphens only. + */ + configId?: string; + /** + * Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]". + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NotificationConfig; + } + export interface Params$Resource$Organizations$Notificationconfigs$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". + */ + name?: string; + } + export interface Params$Resource$Organizations$Notificationconfigs$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". + */ + name?: string; + } + export interface Params$Resource$Organizations$Notificationconfigs$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + */ + pageSize?: number; + /** + * The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data. + */ + pageToken?: string; + /** + * Required. Name of the organization to list notification configs. Its format is "organizations/[organization_id]". + */ + parent?: string; + } + export interface Params$Resource$Organizations$Notificationconfigs$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + */ + name?: string; + /** + * The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NotificationConfig; + } + export class Resource$Organizations$Operations { context: APIRequestContext; constructor(context: APIRequestContext) { @@ -3802,7 +4339,7 @@ export namespace securitycenter_v1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.compareDuration When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding was not present at the start of compare_duration, but was present at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. + * @param {string=} params.compareDuration When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. * @param {string=} params.fieldMask Optional. A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields. * @param {string=} params.filter Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: name: `=` parent: `=`, `:` resource_name: `=`, `:` state: `=`, `:` category: `=`, `:` external_uri: `=`, `:` event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: "event_time = \"2019-06-10T16:07:18-07:00\"" "event_time = 1560208038000" security_marks.marks: `=`, `:` source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter string. * @param {string=} params.orderBy Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be appended to the field name. For example: "name desc,source_properties.a_property". Redundant space characters in the syntax are insignificant. "name desc,source_properties.a_property" and " name desc , source_properties.a_property " are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks @@ -4311,7 +4848,7 @@ export namespace securitycenter_v1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding was not present at the start of compare_duration, but was present at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. + * When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. */ compareDuration?: string; /** diff --git a/src/apis/securitycenter/v1beta1.ts b/src/apis/securitycenter/v1beta1.ts index 0972ba343a..e95b2981d9 100644 --- a/src/apis/securitycenter/v1beta1.ts +++ b/src/apis/securitycenter/v1beta1.ts @@ -229,6 +229,51 @@ export namespace securitycenter_v1beta1 { */ title?: string | null; } + /** + * Cloud Security Command Center (Cloud SCC) finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Cloud SCC for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding. + */ + export interface Schema$Finding { + /** + * The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION" + */ + category?: string | null; + /** + * The time at which the finding was created in Cloud SCC. + */ + createTime?: string | null; + /** + * The time at which the event took place. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. + */ + eventTime?: string | null; + /** + * The URI that, if available, points to a web page outside of Cloud SCC where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL. + */ + externalUri?: string | null; + /** + * The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + */ + name?: string | null; + /** + * The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: "organizations/{organization_id}/sources/{source_id}" + */ + parent?: string | null; + /** + * For findings on Google Cloud Platform (GCP) resources, the full resource name of the GCP resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-GCP resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time. + */ + resourceName?: string | null; + /** + * Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding. + */ + securityMarks?: Schema$SecurityMarks; + /** + * Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only. + */ + sourceProperties?: {[key: string]: any} | null; + /** + * The state of the finding. + */ + state?: string | null; + } /** * Request message for `GetIamPolicy` method. */ @@ -318,6 +363,19 @@ export namespace securitycenter_v1beta1 { */ name?: string | null; } + /** + * Cloud SCC's Notification + */ + export interface Schema$GoogleCloudSecuritycenterV1NotificationMessage { + /** + * If it's a Finding based notification config, this field will be populated. + */ + finding?: Schema$Finding; + /** + * Name of the notification config that generated current notification. + */ + notificationConfigName?: string | null; + } /** * Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud Platform (GCP) resource. The Asset is a Cloud SCC resource that captures information about a single GCP resource. All modifications to an Asset are only within the context of Cloud SCC and don't affect the referenced GCP resource. */ @@ -785,6 +843,19 @@ export namespace securitycenter_v1beta1 { */ resourceType?: string | null; } + /** + * User specified security marks that are attached to the parent Cloud Security Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud SCC organization -- they can be modified and viewed by all users who have proper permissions on the organization. + */ + export interface Schema$SecurityMarks { + /** + * Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive) + */ + marks?: {[key: string]: string} | null; + /** + * The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + */ + name?: string | null; + } /** * Request message for updating a finding's state. */ diff --git a/src/apis/securitycenter/v1p1alpha1.ts b/src/apis/securitycenter/v1p1alpha1.ts index aaca48e06f..901e9bbb5a 100644 --- a/src/apis/securitycenter/v1p1alpha1.ts +++ b/src/apis/securitycenter/v1p1alpha1.ts @@ -119,6 +119,51 @@ export namespace securitycenter_v1p1alpha1 { * 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 {} + /** + * Cloud Security Command Center (Cloud SCC) finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Cloud SCC for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding. + */ + export interface Schema$Finding { + /** + * The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION" + */ + category?: string | null; + /** + * The time at which the finding was created in Cloud SCC. + */ + createTime?: string | null; + /** + * The time at which the event took place. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. + */ + eventTime?: string | null; + /** + * The URI that, if available, points to a web page outside of Cloud SCC where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL. + */ + externalUri?: string | null; + /** + * The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + */ + name?: string | null; + /** + * The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: "organizations/{organization_id}/sources/{source_id}" + */ + parent?: string | null; + /** + * For findings on Google Cloud Platform (GCP) resources, the full resource name of the GCP resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-GCP resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time. + */ + resourceName?: string | null; + /** + * Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding. + */ + securityMarks?: Schema$SecurityMarks; + /** + * Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only. + */ + sourceProperties?: {[key: string]: any} | null; + /** + * The state of the finding. + */ + state?: string | null; + } /** * Response of asset discovery run */ @@ -132,6 +177,19 @@ export namespace securitycenter_v1p1alpha1 { */ state?: string | null; } + /** + * Cloud SCC's Notification + */ + export interface Schema$GoogleCloudSecuritycenterV1NotificationMessage { + /** + * If it's a Finding based notification config, this field will be populated. + */ + finding?: Schema$Finding; + /** + * Name of the notification config that generated current notification. + */ + notificationConfigName?: string | null; + } /** * Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud Platform (GCP) resource. The Asset is a Cloud SCC resource that captures information about a single GCP resource. All modifications to an Asset are only within the context of Cloud SCC and don't affect the referenced GCP resource. */ @@ -363,6 +421,19 @@ export namespace securitycenter_v1p1alpha1 { */ response?: {[key: string]: any} | null; } + /** + * User specified security marks that are attached to the parent Cloud Security Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud SCC organization -- they can be modified and viewed by all users who have proper permissions on the organization. + */ + export interface Schema$SecurityMarks { + /** + * Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive) + */ + marks?: {[key: string]: string} | null; + /** + * The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + */ + name?: string | null; + } /** * 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). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ diff --git a/src/apis/securitycenter/v1p1beta1.ts b/src/apis/securitycenter/v1p1beta1.ts index 853a0b129d..16e98c252d 100644 --- a/src/apis/securitycenter/v1p1beta1.ts +++ b/src/apis/securitycenter/v1p1beta1.ts @@ -196,6 +196,51 @@ export namespace securitycenter_v1p1beta1 { */ title?: string | null; } + /** + * Cloud Security Command Center (Cloud SCC) finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Cloud SCC for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding. + */ + export interface Schema$Finding { + /** + * The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION" + */ + category?: string | null; + /** + * The time at which the finding was created in Cloud SCC. + */ + createTime?: string | null; + /** + * The time at which the event took place. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. + */ + eventTime?: string | null; + /** + * The URI that, if available, points to a web page outside of Cloud SCC where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL. + */ + externalUri?: string | null; + /** + * The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + */ + name?: string | null; + /** + * The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: "organizations/{organization_id}/sources/{source_id}" + */ + parent?: string | null; + /** + * For findings on Google Cloud Platform (GCP) resources, the full resource name of the GCP resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-GCP resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time. + */ + resourceName?: string | null; + /** + * Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding. + */ + securityMarks?: Schema$SecurityMarks; + /** + * Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only. + */ + sourceProperties?: {[key: string]: any} | null; + /** + * The state of the finding. + */ + state?: string | null; + } /** * Request message for `GetIamPolicy` method. */ @@ -227,6 +272,19 @@ export namespace securitycenter_v1p1beta1 { */ state?: string | null; } + /** + * Cloud SCC's Notification + */ + export interface Schema$GoogleCloudSecuritycenterV1NotificationMessage { + /** + * If it's a Finding based notification config, this field will be populated. + */ + finding?: Schema$Finding; + /** + * Name of the notification config that generated current notification. + */ + notificationConfigName?: string | null; + } /** * Cloud Security Command Center's (Cloud SCC) representation of a Google Cloud Platform (GCP) resource. The Asset is a Cloud SCC resource that captures information about a single GCP resource. All modifications to an Asset are only within the context of Cloud SCC and don't affect the referenced GCP resource. */ @@ -475,7 +533,7 @@ export namespace securitycenter_v1p1beta1 { */ export interface Schema$GroupFindingsRequest { /** - * When compare_duration is set, the GroupResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding was not present at the start of compare_duration, but was present at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. If this field is set then `state_change` must be a specified field in `group_by`. + * When compare_duration is set, the GroupResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. If this field is set then `state_change` must be a specified field in `group_by`. */ compareDuration?: string | null; /** @@ -765,6 +823,19 @@ export namespace securitycenter_v1p1beta1 { * Request message for running asset discovery for an organization. */ export interface Schema$RunAssetDiscoveryRequest {} + /** + * User specified security marks that are attached to the parent Cloud Security Command Center (Cloud SCC) resource. Security marks are scoped within a Cloud SCC organization -- they can be modified and viewed by all users who have proper permissions on the organization. + */ + export interface Schema$SecurityMarks { + /** + * Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive) + */ + marks?: {[key: string]: string} | null; + /** + * The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: "organizations/{organization_id}/assets/{asset_id}/securityMarks" "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + */ + name?: string | null; + } /** * Request message for updating a finding's state. */ @@ -3176,7 +3247,7 @@ export namespace securitycenter_v1p1beta1 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.compareDuration When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding was not present at the start of compare_duration, but was present at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. + * @param {string=} params.compareDuration When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. * @param {string=} params.fieldMask Optional. A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields. * @param {string=} params.filter Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: name: `=` parent: `=`, `:` resource_name: `=`, `:` state: `=`, `:` category: `=`, `:` external_uri: `=`, `:` event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: "event_time = \"2019-06-10T16:07:18-07:00\"" "event_time = 1560208038000" security_marks.marks: `=`, `:` source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter string. * @param {string=} params.orderBy Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: "name,resource_properties.a_property". The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be appended to the field name. For example: "name desc,source_properties.a_property". Redundant space characters in the syntax are insignificant. "name desc,source_properties.a_property" and " name desc , source_properties.a_property " are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks @@ -3595,7 +3666,7 @@ export namespace securitycenter_v1p1beta1 { auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; /** - * When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding was not present at the start of compare_duration, but was present at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. + * When compare_duration is set, the ListFindingsResult's "state_change" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible "state_change" values when compare_duration is specified: * "CHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * "UNCHANGED": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * "ADDED": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * "REMOVED": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is "UNUSED", which will be the state_change set for all findings present at read_time. */ compareDuration?: string; /** diff --git a/src/apis/serviceconsumermanagement/v1.ts b/src/apis/serviceconsumermanagement/v1.ts index e5b9b4a0c9..6417e360c8 100644 --- a/src/apis/serviceconsumermanagement/v1.ts +++ b/src/apis/serviceconsumermanagement/v1.ts @@ -1140,7 +1140,7 @@ export namespace serviceconsumermanagement_v1 { */ 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`. + * 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 | null; /** @@ -1541,7 +1541,7 @@ export namespace serviceconsumermanagement_v1 { */ export interface Schema$V1Beta1QuotaOverride { /** - * If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the override is only applied to quota consumed in that region. This map has the following restrictions: - Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. - "project" is not a valid key; the project is already specified in the parent resource name. - "user" is not a valid key; the API does not support quota overrides that apply only to a specific user. - If "region" appears as a key, its value must be a valid Cloud region. - If "zone" appears as a key, its value must be a valid Cloud zone. - If any valid key other than "region" or "zone" appears in the map, then all valid keys other than "region" or "zone" must also appear in the map. + * If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the override is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * "project" is not a valid key; the project is already specified in the parent resource name. * "user" is not a valid key; the API does not support quota overrides that apply only to a specific user. * If "region" appears as a key, its value must be a valid Cloud region. * If "zone" appears as a key, its value must be a valid Cloud zone. * If any valid key other than "region" or "zone" appears in the map, then all valid keys other than "region" or "zone" must also appear in the map. */ dimensions?: {[key: string]: string} | null; /** diff --git a/src/apis/servicemanagement/v1.ts b/src/apis/servicemanagement/v1.ts index 3893913139..d09af4f72d 100644 --- a/src/apis/servicemanagement/v1.ts +++ b/src/apis/servicemanagement/v1.ts @@ -243,6 +243,10 @@ export namespace servicemanagement_v1 { * 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 | null; + /** + * Defines the locations to extract the JWT. JWT locations can be either from HTTP headers or URL query parameters. The rule is that the first match wins. The checking order is: checking all headers first, then URL query parameters. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: "Bearer " - header: x-goog-iap-jwt-assertion - query: access_token + */ + jwtLocations?: Schema$JwtLocation[]; } /** * User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). @@ -851,6 +855,23 @@ export namespace servicemanagement_v1 { */ selector?: string | null; } + /** + * Specifies a location to extract JWT from an API request. + */ + export interface Schema$JwtLocation { + /** + * Specifies HTTP header name to extract JWT token. + */ + header?: string | null; + /** + * Specifies URL query parameter name to extract JWT token. + */ + query?: string | null; + /** + * The value prefix. The value format is "value_prefix{token}" Only applies to "in" header type. Must be empty for "in" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for "Authorization: Bearer {JWT}", value_prefix="Bearer " with a space at the end. + */ + valuePrefix?: string | null; + } /** * A description of a label. */ @@ -1329,7 +1350,7 @@ export namespace servicemanagement_v1 { */ export interface Schema$Rollout { /** - * The user who created the Rollout. Readonly. + * This field is deprecated and will be deleted. Please remove usage of this field. */ createdBy?: string | null; /** diff --git a/src/apis/servicenetworking/v1.ts b/src/apis/servicenetworking/v1.ts index faf811e6ff..a37c0669db 100644 --- a/src/apis/servicenetworking/v1.ts +++ b/src/apis/servicenetworking/v1.ts @@ -1180,7 +1180,7 @@ export namespace servicenetworking_v1 { */ 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`. + * 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 | null; /** diff --git a/src/apis/servicenetworking/v1beta.ts b/src/apis/servicenetworking/v1beta.ts index cf10fb70c9..d2ec3a2c2c 100644 --- a/src/apis/servicenetworking/v1beta.ts +++ b/src/apis/servicenetworking/v1beta.ts @@ -1115,7 +1115,7 @@ export namespace servicenetworking_v1beta { */ 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`. + * 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 | null; /** diff --git a/src/apis/serviceusage/v1.ts b/src/apis/serviceusage/v1.ts index 05b96f1653..15f6d9782a 100644 --- a/src/apis/serviceusage/v1.ts +++ b/src/apis/serviceusage/v1.ts @@ -661,7 +661,7 @@ export namespace serviceusage_v1 { */ 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`. + * 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 | null; /** @@ -1348,7 +1348,7 @@ export namespace serviceusage_v1 { */ export interface Schema$QuotaOverride { /** - * If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the override is only applied to quota consumed in that region. This map has the following restrictions: - Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. - "project" is not a valid key; the project is already specified in the parent resource name. - "user" is not a valid key; the API does not support quota overrides that apply only to a specific user. - If "region" appears as a key, its value must be a valid Cloud region. - If "zone" appears as a key, its value must be a valid Cloud zone. - If any valid key other than "region" or "zone" appears in the map, then all valid keys other than "region" or "zone" must also appear in the map. + * If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the override is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * "project" is not a valid key; the project is already specified in the parent resource name. * "user" is not a valid key; the API does not support quota overrides that apply only to a specific user. * If "region" appears as a key, its value must be a valid Cloud region. * If "zone" appears as a key, its value must be a valid Cloud zone. * If any valid key other than "region" or "zone" appears in the map, then all valid keys other than "region" or "zone" must also appear in the map. */ dimensions?: {[key: string]: string} | null; /** diff --git a/src/apis/serviceusage/v1beta1.ts b/src/apis/serviceusage/v1beta1.ts index 9c8b6077a4..e16a8ca5c4 100644 --- a/src/apis/serviceusage/v1beta1.ts +++ b/src/apis/serviceusage/v1beta1.ts @@ -652,7 +652,7 @@ export namespace serviceusage_v1beta1 { */ 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`. + * 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 | null; /** @@ -1339,7 +1339,7 @@ export namespace serviceusage_v1beta1 { */ export interface Schema$QuotaOverride { /** - * If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the override is only applied to quota consumed in that region. This map has the following restrictions: - Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. - "project" is not a valid key; the project is already specified in the parent resource name. - "user" is not a valid key; the API does not support quota overrides that apply only to a specific user. - If "region" appears as a key, its value must be a valid Cloud region. - If "zone" appears as a key, its value must be a valid Cloud zone. - If any valid key other than "region" or "zone" appears in the map, then all valid keys other than "region" or "zone" must also appear in the map. + * If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key "region" and the value "us-east-1"; the override is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * "project" is not a valid key; the project is already specified in the parent resource name. * "user" is not a valid key; the API does not support quota overrides that apply only to a specific user. * If "region" appears as a key, its value must be a valid Cloud region. * If "zone" appears as a key, its value must be a valid Cloud zone. * If any valid key other than "region" or "zone" appears in the map, then all valid keys other than "region" or "zone" must also appear in the map. */ dimensions?: {[key: string]: string} | null; /** diff --git a/src/apis/sheets/v4.ts b/src/apis/sheets/v4.ts index 47f639e1b6..8a307324d2 100644 --- a/src/apis/sheets/v4.ts +++ b/src/apis/sheets/v4.ts @@ -1889,19 +1889,19 @@ export namespace sheets_v4 { */ hiddenValues?: string[] | null; /** - * The background fill color to filter by; only cells with this fill color are shown. Mutually exclusive with all other filter criteria. Requests to set this field fail with a 400 error if any other filter criteria field is set. + * The background fill color to filter by; only cells with this fill color are shown. Mutually exclusive with visible_foreground_color. */ visibleBackgroundColor?: Schema$Color; /** - * The background fill color to filter by; only cells with this fill color are shown. Mutually exclusive with all other filter criteria. Requests to set this field fail with a 400 error if any other filter criteria field is set. If visible_background_color is also set, this field takes precedence. + * The background fill color to filter by; only cells with this fill color are shown. This field is mutually exclusive with visible_foreground_color, and must be set to an RGB-type color. If visible_background_color is also set, this field takes precedence. */ visibleBackgroundColorStyle?: Schema$ColorStyle; /** - * The text color to filter by; only cells with this text color are shown. Mutually exclusive with all other filter criteria. Requests to set this field fail with a 400 error if any other filter criteria field is set. + * The foreground color to filter by; only cells with this foreground color are shown. Mutually exclusive with visible_background_color. */ visibleForegroundColor?: Schema$Color; /** - * The text color to filter by; only cells with this text color are shown. Mutually exclusive with all other filter criteria. Requests to set this field fail with a 400 error if any other filter criteria field is set. If visible_foreground_color is also set, this field takes precedence. + * The foreground color to filter by; only cells with this foreground color are shown. This field is mutually exclusive with visible_background_color, and must be set to an RGB-type color. If visible_foreground_color is also set, this field takes precedence. */ visibleForegroundColorStyle?: Schema$ColorStyle; } @@ -3308,11 +3308,11 @@ export namespace sheets_v4 { */ export interface Schema$SortSpec { /** - * The background fill color to sort by. Mutually exclusive with sorting by text color. Requests to set this field fail with a 400 error if foreground color is also set. + * The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color. */ backgroundColor?: Schema$Color; /** - * The background fill color to sort by. Mutually exclusive with sorting by text color. Requests to set this field fail with a 400 error if foreground color is also set. If background_color is also set, this field takes precedence. + * The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color, and must be an RGB-type color. If background_color is also set, this field takes precedence. */ backgroundColorStyle?: Schema$ColorStyle; /** @@ -3320,11 +3320,11 @@ export namespace sheets_v4 { */ dimensionIndex?: number | null; /** - * The text color to sort by. Mutually exclusive with sorting by background fill color. Requests to set this field fail with a 400 error if background color is also set. + * The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color. */ foregroundColor?: Schema$Color; /** - * The text color to sort by. Mutually exclusive with sorting by background fill color. Requests to set this field fail with a 400 error if background color is also set. If foreground_color is also set, this field takes precedence. + * The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color, and must be an RGB-type color. If foreground_color is also set, this field takes precedence. */ foregroundColorStyle?: Schema$ColorStyle; /** diff --git a/src/apis/spanner/v1.ts b/src/apis/spanner/v1.ts index 06adea2bf1..aea4516156 100644 --- a/src/apis/spanner/v1.ts +++ b/src/apis/spanner/v1.ts @@ -115,6 +115,56 @@ export namespace spanner_v1 { } } + /** + * A backup of a Cloud Spanner database. + */ + export interface Schema$Backup { + /** + * Output only. The backup will contain an externally consistent copy of the database at the timestamp specified by `create_time`. `create_time` is approximately the time the CreateBackup request is received. + */ + createTime?: string | null; + /** + * Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/<project>/instances/<instance>/databases/<database>`. + */ + database?: string | null; + /** + * Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup. + */ + expireTime?: string | null; + /** + * Output only for the CreateBackup][DatabaseAdmin.CreateBackup] operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects/<project>/instances/<instance>`. + */ + name?: string | null; + /** + * Output only. The names of the restored databases that reference the backup. The database names are of the form `projects/<project>/instances/<instance>/databases/<database>`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed. + */ + referencingDatabases?: string[] | null; + /** + * Output only. Size of the backup in bytes. + */ + sizeBytes?: string | null; + /** + * Output only. The current state of the backup. + */ + state?: string | null; + } + /** + * Information about a backup. + */ + export interface Schema$BackupInfo { + /** + * Name of the backup. + */ + backup?: string | null; + /** + * The backup contains an externally consistent copy of `source_database` at the timestamp specified by `create_time`. + */ + createTime?: string | null; + /** + * Name of the database the backup was created from. + */ + sourceDatabase?: string | null; + } /** * The request for BatchCreateSessions. */ @@ -206,6 +256,27 @@ export namespace spanner_v1 { */ commitTimestamp?: string | null; } + /** + * Metadata type for the operation returned by CreateBackup. + */ + export interface Schema$CreateBackupMetadata { + /** + * The time at which cancellation of this operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + cancelTime?: string | null; + /** + * The name of the database the backup is created from. + */ + database?: string | null; + /** + * The name of the backup being created. + */ + name?: string | null; + /** + * The progress of the CreateBackup operation. + */ + progress?: Schema$OperationProgress; + } /** * Metadata type for the operation returned by CreateDatabase. */ @@ -224,7 +295,7 @@ export namespace spanner_v1 { */ createStatement?: string | null; /** - * An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created. + * Optional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created. */ extraStatements?: string[] | null; } @@ -275,10 +346,18 @@ export namespace spanner_v1 { * A Cloud Spanner database. */ export interface Schema$Database { + /** + * Output only. If exists, the time at which the database creation started. + */ + createTime?: string | null; /** * Required. The name of the database. Values are of the form `projects/<project>/instances/<instance>/databases/<database>`, where `<database>` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database. */ name?: string | null; + /** + * Output only. Applicable only for restored databases. Contains information about the restore source. + */ + restoreInfo?: Schema$RestoreInfo; /** * Output only. The current database state. */ @@ -351,6 +430,10 @@ export namespace spanner_v1 { * Used to control the amount of debugging information returned in ResultSetStats. If partition_token is set, query_mode can only be set to QueryMode.NORMAL. */ queryMode?: string | null; + /** + * Query optimizer configuration to use for the given query. + */ + queryOptions?: Schema$QueryOptions; /** * If this request is resuming a previously interrupted SQL statement execution, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new SQL statement execution to resume where the last one left off. The rest of the request parameters must exactly match the request that yielded this token. */ @@ -442,7 +525,7 @@ export namespace spanner_v1 { */ displayName?: string | null; /** - * Output only. A set of endpoint URIs based on your instance config that you can use instead of the global endpoint `spanner.googleapis.com`. For example, if your instance config is `us-central1` (a regional config in Iowa), then your instance specific endpoints may include `us-central1-spanner.googleapis.com`. By calling these endpoints instead of the global endpoint, you optimize network routing which could reduce network latency. The client libraries, JDBC drivers, and other SDK clients automatically call these instance specific endpoints. If you are using DNS whitelists, firewalls, or filtering to control access to endpoints, make sure you grant access to `*spanner.googleapis.com`. + * Deprecated. This field is not populated. */ endpointUris?: string[] | null; /** @@ -517,6 +600,45 @@ export namespace spanner_v1 { */ ranges?: Schema$KeyRange[]; } + /** + * The response for ListBackupOperations. + */ + export interface Schema$ListBackupOperationsResponse { + /** + * `next_page_token` can be sent in a subsequent ListBackupOperations call to fetch more of the matching metadata. + */ + nextPageToken?: string | null; + /** + * The list of matching backup long-running operations. Each operation's name will be prefixed by the backup's name and the operation's metadata will be of type CreateBackupMetadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation. + */ + operations?: Schema$Operation[]; + } + /** + * The response for ListBackups. + */ + export interface Schema$ListBackupsResponse { + /** + * The list of matching backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`. + */ + backups?: Schema$Backup[]; + /** + * `next_page_token` can be sent in a subsequent ListBackups call to fetch more of the matching backups. + */ + nextPageToken?: string | null; + } + /** + * The response for ListDatabaseOperations. + */ + export interface Schema$ListDatabaseOperationsResponse { + /** + * `next_page_token` can be sent in a subsequent ListDatabaseOperations call to fetch more of the matching metadata. + */ + nextPageToken?: string | null; + /** + * The list of matching database long-running operations. Each operation's name will be prefixed by the database's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata. + */ + operations?: Schema$Operation[]; + } /** * The response for ListDatabases. */ @@ -632,6 +754,36 @@ export namespace spanner_v1 { */ response?: {[key: string]: any} | null; } + /** + * Encapsulates progress related information for a Cloud Spanner long running operation. + */ + export interface Schema$OperationProgress { + /** + * If set, the time at which this operation failed or was completed successfully. + */ + endTime?: string | null; + /** + * Percent completion of the operation. Values are between 0 and 100 inclusive. + */ + progressPercent?: number | null; + /** + * Time the request was received. + */ + startTime?: string | null; + } + /** + * Metadata type for the long-running operation used to track the progress of optimizations performed on a newly restored database. This long-running operation is automatically created by the system after the successful completion of a database restore, and cannot be cancelled. + */ + export interface Schema$OptimizeRestoredDatabaseMetadata { + /** + * Name of the restored database being optimized. + */ + name?: string | null; + /** + * The progress of the post-restore optimizations. + */ + progress?: Schema$OperationProgress; + } /** * Partial results from a streaming read or SQL query. Streaming reads and SQL queries better tolerate large result sets, large rows, and large values, but are a little trickier to consume. */ @@ -800,6 +952,15 @@ export namespace spanner_v1 { */ version?: number | null; } + /** + * Query optimizer configuration. + */ + export interface Schema$QueryOptions { + /** + * An option to control the selection of optimizer version. This parameter allows individual queries to pick different query optimizer versions. Specifying "latest" as a value instructs Cloud Spanner to use the latest supported query optimizer version. If not specified, Cloud Spanner uses optimizer version set at the database level options. Any other positive integer (from the list of supported optimizer versions) overrides the default optimizer version for query execution. The list of supported optimizer versions can be queried from SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an invalid optimizer version will fail with a syntax error (`INVALID_ARGUMENT`) status. The `optimizer_version` statement hint has precedence over this setting. + */ + optimizerVersion?: string | null; + } /** * Contains an ordered list of nodes appearing in the query plan. */ @@ -893,6 +1054,61 @@ export namespace spanner_v1 { */ type?: string | null; } + /** + * Metadata type for the long-running operation returned by RestoreDatabase. + */ + export interface Schema$RestoreDatabaseMetadata { + /** + * Information about the backup used to restore the database. + */ + backupInfo?: Schema$BackupInfo; + /** + * The time at which cancellation of this operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + */ + cancelTime?: string | null; + /** + * Name of the database being created and restored to. + */ + name?: string | null; + /** + * If exists, the name of the long-running operation that will be used to track the post-restore optimization process to optimize the performance of the restored database, and remove the dependency on the restore source. The name is of the form `projects/<project>/instances/<instance>/databases/<database>/operations/<operation> where the <database> is the name of database being created and restored to. The metadata type of the long-running operation is OptimizeRestoredDatabaseMetadata. This long-running operation will be automatically created by the system after the RestoreDatabase long-running operation completes successfully. This operation will not be created if the restore was not successful. + */ + optimizeDatabaseOperationName?: string | null; + /** + * The progress of the RestoreDatabase operation. + */ + progress?: Schema$OperationProgress; + /** + * The type of the restore source. + */ + sourceType?: string | null; + } + /** + * The request for RestoreDatabase. + */ + export interface Schema$RestoreDatabaseRequest { + /** + * Name of the backup from which to restore. Values are of the form `projects/<project>/instances/<instance>/backups/<backup>`. + */ + backup?: string | null; + /** + * Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects/<project>/instances/<instance>/databases/<database_id>`. + */ + databaseId?: string | null; + } + /** + * Information about the database restore. + */ + export interface Schema$RestoreInfo { + /** + * Information about the backup used to restore the database. The backup may no longer exist. + */ + backupInfo?: Schema$BackupInfo; + /** + * The type of the restore source. + */ + sourceType?: string | null; + } /** * Results from Read or ExecuteSql. */ @@ -1412,12 +1628,20 @@ export namespace spanner_v1 { export class Resource$Projects$Instances { context: APIRequestContext; + backupOperations: Resource$Projects$Instances$Backupoperations; backups: Resource$Projects$Instances$Backups; + databaseOperations: Resource$Projects$Instances$Databaseoperations; databases: Resource$Projects$Instances$Databases; operations: Resource$Projects$Instances$Operations; constructor(context: APIRequestContext) { this.context = context; + this.backupOperations = new Resource$Projects$Instances$Backupoperations( + this.context + ); this.backups = new Resource$Projects$Instances$Backups(this.context); + this.databaseOperations = new Resource$Projects$Instances$Databaseoperations( + this.context + ); this.databases = new Resource$Projects$Instances$Databases(this.context); this.operations = new Resource$Projects$Instances$Operations( this.context @@ -2156,57 +2380,61 @@ export namespace spanner_v1 { requestBody?: Schema$TestIamPermissionsRequest; } - export class Resource$Projects$Instances$Backups { + export class Resource$Projects$Instances$Backupoperations { context: APIRequestContext; - operations: Resource$Projects$Instances$Backups$Operations; constructor(context: APIRequestContext) { this.context = context; - this.operations = new Resource$Projects$Instances$Backups$Operations( - this.context - ); } /** - * spanner.projects.instances.backups.getIamPolicy - * @desc Gets the access control policy for a database resource. Returns an empty policy if a database exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. - * @alias spanner.projects.instances.backups.getIamPolicy + * spanner.projects.instances.backupOperations.list + * @desc Lists the backup long-running operations in the given instance. A backup operation has a name of the form `projects//instances//backups//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation. + * @alias spanner.projects.instances.backupOperations.list * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources. - * @param {().GetIamPolicyRequest} params.requestBody Request body data + * @param {string=} params.filter A filter expression that filters what operations are returned in the response. The filter expression must specify the field name of an operation, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is roughly synonymous with equality. Filter rules are case insensitive. The long-running operation fields eligible for filtering are: * `name` --> The name of the long-running operation * `done` --> False if the operation is in progress, else true. * `metadata.type_url` (using filter string `metadata.@type`) and fields in `metadata.value` (using filter string `metadata.`, where is a field in metadata.value) are eligible for filtering. * `error` --> Error associated with the long-running operation. * `response.type_url` (using filter string `response.@type`) and fields in `response.value` (using filter string `response.`, where is a field in response.value) are eligible for filtering. To filter on multiple expressions, provide each separate expression within parentheses. By default, each expression is an AND expression. However, you can include AND, OR, and NOT expressions explicitly. Some examples of using filters are: * `done:true` --> The operation is complete. * `metadata.database:prod` --> The database the backup was taken from has a name containing the string "prod". * `(metadata.@type:type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND (metadata.name:howl) AND (metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND (error:*)` --> Return CreateBackup operations where the created backup name contains the string "howl", the progress.start_time of the backup operation is before 2018-03-28T14:50:00Z, and the operation returned an error. + * @param {integer=} params.pageSize Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. + * @param {string=} params.pageToken If non-empty, `page_token` should contain a next_page_token from a previous ListBackupOperationsResponse to the same `parent` and with the same `filter`. + * @param {string} params.parent Required. The instance of the backup operations. Values are of the form `projects//instances/`. * @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 */ - getIamPolicy( - params?: Params$Resource$Projects$Instances$Backups$Getiampolicy, + list( + params?: Params$Resource$Projects$Instances$Backupoperations$List, options?: MethodOptions - ): GaxiosPromise; - getIamPolicy( - params: Params$Resource$Projects$Instances$Backups$Getiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Instances$Backupoperations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Projects$Instances$Backups$Getiampolicy, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Instances$Backupoperations$List, + callback: BodyResponseCallback ): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Instances$Backups$Getiampolicy - | BodyResponseCallback, - optionsOrCallback?: MethodOptions | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | Params$Resource$Projects$Instances$Backupoperations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Instances$Backups$Getiampolicy; + {}) as Params$Resource$Projects$Instances$Backupoperations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Instances$Backups$Getiampolicy; + params = {} as Params$Resource$Projects$Instances$Backupoperations$List; options = {}; } @@ -2219,62 +2447,538 @@ export namespace spanner_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace( + url: (rootUrl + '/v1/{+parent}/backupOperations').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['resource'], - pathParams: ['resource'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest(parameters, callback); + createAPIRequest( + parameters, + callback + ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Projects$Instances$Backupoperations$List + extends StandardParameters { /** - * spanner.projects.instances.backups.setIamPolicy - * @desc Sets the access control policy on a database resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. - * @alias spanner.projects.instances.backups.setIamPolicy + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * A filter expression that filters what operations are returned in the response. The filter expression must specify the field name of an operation, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is roughly synonymous with equality. Filter rules are case insensitive. The long-running operation fields eligible for filtering are: * `name` --> The name of the long-running operation * `done` --> False if the operation is in progress, else true. * `metadata.type_url` (using filter string `metadata.@type`) and fields in `metadata.value` (using filter string `metadata.`, where is a field in metadata.value) are eligible for filtering. * `error` --> Error associated with the long-running operation. * `response.type_url` (using filter string `response.@type`) and fields in `response.value` (using filter string `response.`, where is a field in response.value) are eligible for filtering. To filter on multiple expressions, provide each separate expression within parentheses. By default, each expression is an AND expression. However, you can include AND, OR, and NOT expressions explicitly. Some examples of using filters are: * `done:true` --> The operation is complete. * `metadata.database:prod` --> The database the backup was taken from has a name containing the string "prod". * `(metadata.@type:type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND (metadata.name:howl) AND (metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND (error:*)` --> Return CreateBackup operations where the created backup name contains the string "howl", the progress.start_time of the backup operation is before 2018-03-28T14:50:00Z, and the operation returned an error. + */ + filter?: string; + /** + * Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. + */ + pageSize?: number; + /** + * If non-empty, `page_token` should contain a next_page_token from a previous ListBackupOperationsResponse to the same `parent` and with the same `filter`. + */ + pageToken?: string; + /** + * Required. The instance of the backup operations. Values are of the form `projects//instances/`. + */ + parent?: string; + } + + export class Resource$Projects$Instances$Backups { + context: APIRequestContext; + operations: Resource$Projects$Instances$Backups$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.operations = new Resource$Projects$Instances$Backups$Operations( + this.context + ); + } + + /** + * spanner.projects.instances.backups.create + * @desc Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently. + * @alias spanner.projects.instances.backups.create * @memberOf! () * * @param {object} params Parameters for request - * @param {string} params.resource_ REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources. - * @param {().SetIamPolicyRequest} params.requestBody Request body data + * @param {string=} params.backupId Required. The id of the backup to be created. The `backup_id` appended to `parent` forms the full backup name of the form `projects//instances//backups/`. + * @param {string} params.parent Required. The name of the instance in which the backup will be created. This must be the same instance that contains the database the backup will be created from. The backup will be stored in the location(s) specified in the instance configuration of this instance. Values are of the form `projects//instances/`. + * @param {().Backup} params.requestBody 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 */ - setIamPolicy( - params?: Params$Resource$Projects$Instances$Backups$Setiampolicy, + create( + params?: Params$Resource$Projects$Instances$Backups$Create, options?: MethodOptions - ): GaxiosPromise; - setIamPolicy( - params: Params$Resource$Projects$Instances$Backups$Setiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Instances$Backups$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Projects$Instances$Backups$Setiampolicy, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Instances$Backups$Create, + callback: BodyResponseCallback ): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + create(callback: BodyResponseCallback): void; + create( paramsOrCallback?: - | Params$Resource$Projects$Instances$Backups$Setiampolicy - | BodyResponseCallback, - optionsOrCallback?: MethodOptions | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { + | Params$Resource$Projects$Instances$Backups$Create + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Instances$Backups$Setiampolicy; + {}) as Params$Resource$Projects$Instances$Backups$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Backups$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/backups').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * spanner.projects.instances.backups.delete + * @desc Deletes a pending or completed Backup. + * @alias spanner.projects.instances.backups.delete + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Name of the backup to delete. Values are of the form `projects//instances//backups/`. + * @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$Instances$Backups$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Instances$Backups$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Instances$Backups$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Backups$Delete + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Backups$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Backups$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * spanner.projects.instances.backups.get + * @desc Gets metadata on a pending or completed Backup. + * @alias spanner.projects.instances.backups.get + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Required. Name of the backup. Values are of the form `projects//instances//backups/`. + * @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$Instances$Backups$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Instances$Backups$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Instances$Backups$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Backups$Get + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Backups$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Backups$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * spanner.projects.instances.backups.getIamPolicy + * @desc Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. + * @alias spanner.projects.instances.backups.getIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources. + * @param {().GetIamPolicyRequest} params.requestBody 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 + */ + getIamPolicy( + params?: Params$Resource$Projects$Instances$Backups$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Instances$Backups$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Instances$Backups$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Backups$Getiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Backups$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Backups$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * spanner.projects.instances.backups.list + * @desc Lists completed and pending backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`. + * @alias spanner.projects.instances.backups.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter A filter expression that filters backups listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is roughly synonymous with equality. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` To filter on multiple expressions, provide each separate expression within parentheses. By default, each expression is an AND expression. However, you can include AND, OR, and NOT expressions explicitly. Some examples of using filters are: * `name:Howl` --> The backup's name contains the string "howl". * `database:prod` --> The database's name contains the string "prod". * `state:CREATING` --> The backup is pending creation. * `state:READY` --> The backup is fully created and ready for use. * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` --> The backup name contains the string "howl" and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\"` --> The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + * @param {integer=} params.pageSize Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. + * @param {string=} params.pageToken If non-empty, `page_token` should contain a next_page_token from a previous ListBackupsResponse to the same `parent` and with the same `filter`. + * @param {string} params.parent Required. The instance to list backups from. Values are of the form `projects//instances/`. + * @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$Instances$Backups$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Instances$Backups$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Instances$Backups$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Backups$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Backups$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Backups$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/backups').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * spanner.projects.instances.backups.patch + * @desc Updates a pending or completed Backup. + * @alias spanner.projects.instances.backups.patch + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.name Output only for the CreateBackup][DatabaseAdmin.CreateBackup] operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`. + * @param {string=} params.updateMask Required. A mask specifying which fields (e.g. `expire_time`) in the Backup resource should be updated. This mask is relative to the Backup resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally by clients that do not know about them. + * @param {().Backup} params.requestBody 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$Instances$Backups$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Instances$Backups$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Instances$Backups$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Backups$Patch + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Backups$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Backups$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + + /** + * spanner.projects.instances.backups.setIamPolicy + * @desc Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. + * @alias spanner.projects.instances.backups.setIamPolicy + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.resource_ REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources. + * @param {().SetIamPolicyRequest} params.requestBody 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 + */ + setIamPolicy( + params?: Params$Resource$Projects$Instances$Backups$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Instances$Backups$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Instances$Backups$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Backups$Setiampolicy + | BodyResponseCallback, + optionsOrCallback?: MethodOptions | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Backups$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { @@ -2314,7 +3018,7 @@ export namespace spanner_v1 { /** * spanner.projects.instances.backups.testIamPermissions - * @desc Returns permissions that the caller has on the specified database resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. + * @desc Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. * @alias spanner.projects.instances.backups.testIamPermissions * @memberOf! () * @@ -2395,6 +3099,51 @@ export namespace spanner_v1 { } } + export interface Params$Resource$Projects$Instances$Backups$Create + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The id of the backup to be created. The `backup_id` appended to `parent` forms the full backup name of the form `projects//instances//backups/`. + */ + backupId?: string; + /** + * Required. The name of the instance in which the backup will be created. This must be the same instance that contains the database the backup will be created from. The backup will be stored in the location(s) specified in the instance configuration of this instance. Values are of the form `projects//instances/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Backup; + } + export interface Params$Resource$Projects$Instances$Backups$Delete + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Name of the backup to delete. Values are of the form `projects//instances//backups/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Instances$Backups$Get + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. Name of the backup. Values are of the form `projects//instances//backups/`. + */ + name?: string; + } export interface Params$Resource$Projects$Instances$Backups$Getiampolicy extends StandardParameters { /** @@ -2412,6 +3161,51 @@ export namespace spanner_v1 { */ requestBody?: Schema$GetIamPolicyRequest; } + export interface Params$Resource$Projects$Instances$Backups$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * A filter expression that filters backups listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is roughly synonymous with equality. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` To filter on multiple expressions, provide each separate expression within parentheses. By default, each expression is an AND expression. However, you can include AND, OR, and NOT expressions explicitly. Some examples of using filters are: * `name:Howl` --> The backup's name contains the string "howl". * `database:prod` --> The database's name contains the string "prod". * `state:CREATING` --> The backup is pending creation. * `state:READY` --> The backup is fully created and ready for use. * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` --> The backup name contains the string "howl" and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\"` --> The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes > 10000000000` --> The backup's size is greater than 10GB + */ + filter?: string; + /** + * Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. + */ + pageSize?: number; + /** + * If non-empty, `page_token` should contain a next_page_token from a previous ListBackupsResponse to the same `parent` and with the same `filter`. + */ + pageToken?: string; + /** + * Required. The instance to list backups from. Values are of the form `projects//instances/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Instances$Backups$Patch + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Output only for the CreateBackup][DatabaseAdmin.CreateBackup] operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`. + */ + name?: string; + /** + * Required. A mask specifying which fields (e.g. `expire_time`) in the Backup resource should be updated. This mask is relative to the Backup resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally by clients that do not know about them. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Backup; + } export interface Params$Resource$Projects$Instances$Backups$Setiampolicy extends StandardParameters { /** @@ -2800,6 +3594,124 @@ export namespace spanner_v1 { pageToken?: string; } + export class Resource$Projects$Instances$Databaseoperations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * spanner.projects.instances.databaseOperations.list + * @desc Lists database longrunning-operations. A database operation has a name of the form `projects//instances//databases//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. + * @alias spanner.projects.instances.databaseOperations.list + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string=} params.filter A filter expression that filters what operations are returned in the response. The filter expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is roughly synonymous with equality. Filter rules are case insensitive. The long-running operation fields eligible for filtering are: * `name` --> The name of the long-running operation * `done` --> False if the operation is in progress, else true. * `metadata.type_url` (using filter string `metadata.@type`) and fields in `metadata.value` (using filter string `metadata.`, where is a field in metadata.value) are eligible for filtering. * `error` --> Error associated with the long-running operation. * `response.type_url` (using filter string `response.@type`) and fields in `response.value` (using filter string `response.`, where is a field in response.value) are eligible for filtering. To filter on multiple expressions, provide each separate expression within parentheses. By default, each expression is an AND expression. However, you can include AND, OR, and NOT expressions explicitly. Some examples of using filters are: * `done:true` --> The operation is complete. * `(metadata.@type:type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND (metadata.source_type:BACKUP) AND (metadata.backup_info.backup:backup_howl) AND (metadata.name:restored_howl) AND (metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND (error:*)` --> Return RestoreDatabase operations from backups whose name contains "backup_howl", where the created database name contains the string "restored_howl", the start_time of the restore operation is before 2018-03-28T14:50:00Z, and the operation returned an error. + * @param {integer=} params.pageSize Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. + * @param {string=} params.pageToken If non-empty, `page_token` should contain a next_page_token from a previous ListDatabaseOperationsResponse to the same `parent` and with the same `filter`. + * @param {string} params.parent Required. The instance of the database operations. Values are of the form `projects//instances/`. + * @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$Instances$Databaseoperations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Instances$Databaseoperations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Instances$Databaseoperations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Databaseoperations$List + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Databaseoperations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Databaseoperations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/databaseOperations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Instances$Databaseoperations$List + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * A filter expression that filters what operations are returned in the response. The filter expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which is roughly synonymous with equality. Filter rules are case insensitive. The long-running operation fields eligible for filtering are: * `name` --> The name of the long-running operation * `done` --> False if the operation is in progress, else true. * `metadata.type_url` (using filter string `metadata.@type`) and fields in `metadata.value` (using filter string `metadata.`, where is a field in metadata.value) are eligible for filtering. * `error` --> Error associated with the long-running operation. * `response.type_url` (using filter string `response.@type`) and fields in `response.value` (using filter string `response.`, where is a field in response.value) are eligible for filtering. To filter on multiple expressions, provide each separate expression within parentheses. By default, each expression is an AND expression. However, you can include AND, OR, and NOT expressions explicitly. Some examples of using filters are: * `done:true` --> The operation is complete. * `(metadata.@type:type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND (metadata.source_type:BACKUP) AND (metadata.backup_info.backup:backup_howl) AND (metadata.name:restored_howl) AND (metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND (error:*)` --> Return RestoreDatabase operations from backups whose name contains "backup_howl", where the created database name contains the string "restored_howl", the start_time of the restore operation is before 2018-03-28T14:50:00Z, and the operation returned an error. + */ + filter?: string; + /** + * Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. + */ + pageSize?: number; + /** + * If non-empty, `page_token` should contain a next_page_token from a previous ListDatabaseOperationsResponse to the same `parent` and with the same `filter`. + */ + pageToken?: string; + /** + * Required. The instance of the database operations. Values are of the form `projects//instances/`. + */ + parent?: string; + } + export class Resource$Projects$Instances$Databases { context: APIRequestContext; operations: Resource$Projects$Instances$Databases$Operations; @@ -2891,7 +3803,7 @@ export namespace spanner_v1 { /** * spanner.projects.instances.databases.dropDatabase - * @desc Drops (aka deletes) a Cloud Spanner database. + * @desc Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their `expire_time`. * @alias spanner.projects.instances.databases.dropDatabase * @memberOf! () * @@ -3105,7 +4017,7 @@ export namespace spanner_v1 { /** * spanner.projects.instances.databases.getIamPolicy - * @desc Gets the access control policy for a database resource. Returns an empty policy if a database exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. + * @desc Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. * @alias spanner.projects.instances.databases.getIamPolicy * @memberOf! () * @@ -3254,9 +4166,84 @@ export namespace spanner_v1 { } } + /** + * spanner.projects.instances.databases.restore + * @desc Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete. + * @alias spanner.projects.instances.databases.restore + * @memberOf! () + * + * @param {object} params Parameters for request + * @param {string} params.parent Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects//instances/. + * @param {().RestoreDatabaseRequest} params.requestBody 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 + */ + restore( + params?: Params$Resource$Projects$Instances$Databases$Restore, + options?: MethodOptions + ): GaxiosPromise; + restore( + params: Params$Resource$Projects$Instances$Databases$Restore, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restore( + params: Params$Resource$Projects$Instances$Databases$Restore, + callback: BodyResponseCallback + ): void; + restore(callback: BodyResponseCallback): void; + restore( + paramsOrCallback?: + | Params$Resource$Projects$Instances$Databases$Restore + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | BodyResponseCallback, + callback?: BodyResponseCallback + ): void | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Instances$Databases$Restore; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Instances$Databases$Restore; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/databases:restore').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest(parameters, callback); + } else { + return createAPIRequest(parameters); + } + } + /** * spanner.projects.instances.databases.setIamPolicy - * @desc Sets the access control policy on a database resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. + * @desc Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. * @alias spanner.projects.instances.databases.setIamPolicy * @memberOf! () * @@ -3329,7 +4316,7 @@ export namespace spanner_v1 { /** * spanner.projects.instances.databases.testIamPermissions - * @desc Returns permissions that the caller has on the specified database resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. + * @desc Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. * @alias spanner.projects.instances.databases.testIamPermissions * @memberOf! () * @@ -3575,6 +4562,23 @@ export namespace spanner_v1 { */ parent?: string; } + export interface Params$Resource$Projects$Instances$Databases$Restore + extends StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; + + /** + * Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects//instances/. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RestoreDatabaseRequest; + } export interface Params$Resource$Projects$Instances$Databases$Setiampolicy extends StandardParameters { /** diff --git a/src/apis/sql/v1beta4.ts b/src/apis/sql/v1beta4.ts index 0f762a227d..4066e07e93 100644 --- a/src/apis/sql/v1beta4.ts +++ b/src/apis/sql/v1beta4.ts @@ -170,7 +170,7 @@ export namespace sql_v1beta4 { */ export interface Schema$BackupConfiguration { /** - * Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well. + * (MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well. */ binaryLogEnabled?: boolean | null; /** @@ -620,9 +620,9 @@ export namespace sql_v1beta4 { * Options for exporting data as SQL statements. */ sqlExportOptions?: { - mysqlExportOptions?: {masterData?: number}; tables?: string[]; schemaOnly?: boolean; + mysqlExportOptions?: {masterData?: number}; } | null; /** * The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form <code>gs: //bucketName/fileName</code>. If the file already exists, the requests // succeeds, but the operation fails. If <code>fileType</code> is // <code>SQL</code> and the filename ends with .gz, the contents are // compressed. @@ -709,9 +709,9 @@ export namespace sql_v1beta4 { */ bakImportOptions?: { encryptionOptions?: { - pvkPassword?: string; certPath?: string; pvkPath?: string; + pvkPassword?: string; }; } | null; /** @@ -1191,7 +1191,7 @@ export namespace sql_v1beta4 { */ authorizedGaeApplications?: string[] | null; /** - * Availability type (PostgreSQL instances only). Potential values: <br><code>ZONAL</code>: The instance serves data from only one zone. Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: The instance can serve data from more than one zone in a region (it is highly available). <br>For more information, see <a href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview of the High Availability Configuration</a>. + * Availability type (PostgreSQL and MySQL instances only). Potential values: <br><code>ZONAL</code>: The instance serves data from only one zone. Outages in that zone affect data accessibility. <br><code>REGIONAL</code>: The instance can serve data from more than one zone in a region (it is highly available). <br>For more information, see <a href="https://cloud.google.com/sql/docs/postgres/high-availability">Overview of the High Availability Configuration</a>. */ availabilityType?: string | null; /** @@ -1567,7 +1567,6 @@ export namespace sql_v1beta4 { * @param {string} params.id The ID of the Backup Run to delete. To find a Backup Run ID, use the list method. * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the backupRun to delete. Format: projects/{project}/locations/{location}/instances/{instance}/backupRuns/{backupRun} * @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 @@ -1644,7 +1643,6 @@ export namespace sql_v1beta4 { * @param {string} params.id The ID of this Backup Run. * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName Name of the resource backupRun. Format: projects/{project}/locations/{location}/instances/{instance}/backupRuns/{backupRun} * @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 @@ -1718,7 +1716,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL should create this backupRun. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {().BackupRun} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -1797,7 +1794,6 @@ export namespace sql_v1beta4 { * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {integer=} params.maxResults Maximum number of backup runs per response. * @param {string=} params.pageToken A previously-returned page token representing part of the larger set of results to view. - * @param {string=} params.parent The parent, which owns this collection of backupRuns. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -1886,10 +1882,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the backupRun to delete. Format: projects/{project}/locations/{location}/instances/{instance}/backupRuns/{backupRun} - */ - resourceName?: string; } export interface Params$Resource$Backupruns$Get extends StandardParameters { /** @@ -1909,10 +1901,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * Name of the resource backupRun. Format: projects/{project}/locations/{location}/instances/{instance}/backupRuns/{backupRun} - */ - resourceName?: string; } export interface Params$Resource$Backupruns$Insert extends StandardParameters { @@ -1925,10 +1913,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL should create this backupRun. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -1957,10 +1941,6 @@ export namespace sql_v1beta4 { * A previously-returned page token representing part of the larger set of results to view. */ pageToken?: string; - /** - * The parent, which owns this collection of backupRuns. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -1983,7 +1963,6 @@ export namespace sql_v1beta4 { * @param {string} params.database Name of the database to be deleted in the instance. * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the database to delete. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} * @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 @@ -2059,7 +2038,6 @@ export namespace sql_v1beta4 { * @param {string} params.database Name of the database in the instance. * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName Name of the resource database. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} * @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 @@ -2131,7 +2109,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Database instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL should add this database. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {().Database} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -2207,7 +2184,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent, which owns this collection of databases. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2278,7 +2254,7 @@ export namespace sql_v1beta4 { /** * sql.databases.patch - * @desc Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. + * @desc Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. * @alias sql.databases.patch * @memberOf! () * @@ -2286,7 +2262,6 @@ export namespace sql_v1beta4 { * @param {string} params.database Name of the database to be updated in the instance. * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the database for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} * @param {().Database} params.requestBody 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. @@ -2363,7 +2338,6 @@ export namespace sql_v1beta4 { * @param {string} params.database Name of the database to be updated in the instance. * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the database for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} * @param {().Database} params.requestBody 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. @@ -2449,10 +2423,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the database to delete. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} - */ - resourceName?: string; } export interface Params$Resource$Databases$Get extends StandardParameters { /** @@ -2472,10 +2442,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * Name of the resource database. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} - */ - resourceName?: string; } export interface Params$Resource$Databases$Insert extends StandardParameters { /** @@ -2487,10 +2453,6 @@ export namespace sql_v1beta4 { * Database instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL should add this database. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -2511,10 +2473,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent, which owns this collection of databases. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -2538,10 +2496,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the database for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} - */ - resourceName?: string; /** * Request body metadata @@ -2566,10 +2520,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the database for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance}/databases/{database} - */ - resourceName?: string; /** * Request body metadata @@ -2680,7 +2630,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL should add this server CA. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -2750,13 +2699,12 @@ export namespace sql_v1beta4 { /** * sql.instances.clone - * @desc Creates a Cloud SQL instance as a clone of the source instance. + * @desc Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. * @alias sql.instances.clone * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.instance The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL should clone this instance. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the source as well as the clone Cloud SQL instance. * @param {().InstancesCloneRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -2833,7 +2781,6 @@ export namespace sql_v1beta4 { * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance to be deleted. - * @param {string=} params.resourceName The name of database instance to delete. Format: projects/{project}/locations/{location}/instances/{instance} * @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 @@ -2906,7 +2853,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance name. - * @param {string=} params.parent The parent resource where Cloud SQL demotes this master database instance. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project ID of the project that contains the instance. * @param {().InstancesDemoteMasterRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -2983,7 +2929,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL exports this database instance. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance to be exported. * @param {().InstancesExportRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3053,13 +2998,12 @@ export namespace sql_v1beta4 { /** * sql.instances.failover - * @desc Failover the instance to its failover replica instance. + * @desc Failover the instance to its failover replica instance. Using this operation might cause your instance to restart. * @alias sql.instances.failover * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL sends this database instance during a failover. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project ID of the project that contains the read replica. * @param {().InstancesFailoverRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3137,7 +3081,6 @@ export namespace sql_v1beta4 { * @param {object} params Parameters for request * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName Name of the resource database instance. Format: projects/{project}/locations/{location}/instances/{instance} * @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 @@ -3210,7 +3153,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL imports this database instance. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {().InstancesImportRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3285,7 +3227,6 @@ export namespace sql_v1beta4 { * @memberOf! () * * @param {object} params Parameters for request - * @param {string=} params.parent The parent resource where Cloud SQL creates this database instance. Format: projects/{project}/locations/{location} * @param {string} params.project Project ID of the project to which the newly created Cloud SQL instances should belong. * @param {().DatabaseInstance} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3362,7 +3303,6 @@ export namespace sql_v1beta4 { * @param {string=} params.filter A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. * @param {integer=} params.maxResults The maximum number of results to return per response. * @param {string=} params.pageToken A previously-returned page token representing part of the larger set of results to view. - * @param {string=} params.parent The parent, which owns this collection of database instances. Format: projects/{project}/locations/{location} * @param {string} params.project Project ID of the project for which to list Cloud SQL instances. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3438,7 +3378,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent, which owns this collection of server CAs. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3524,7 +3463,6 @@ export namespace sql_v1beta4 { * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the database instance for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance} * @param {().DatabaseInstance} params.requestBody 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. @@ -3592,13 +3530,12 @@ export namespace sql_v1beta4 { /** * sql.instances.promoteReplica - * @desc Promotes the read replica instance to be a stand-alone Cloud SQL instance. + * @desc Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. * @alias sql.instances.promoteReplica * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL read replica instance name. - * @param {string=} params.parent The parent resource where Cloud SQL promotes this replica database instance. Format: projects/{project}/locations/{location} * @param {string} params.project ID of the project that contains the read replica. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3674,7 +3611,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL resets this SSL config. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3750,7 +3686,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL restarts this database instance. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance to be restarted. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -3820,13 +3755,12 @@ export namespace sql_v1beta4 { /** * sql.instances.restoreBackup - * @desc Restores a backup of a Cloud SQL instance. + * @desc Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. * @alias sql.instances.restoreBackup * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL restores this database instance from backup. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {().InstancesRestoreBackupRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3903,7 +3837,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL rotates these server CAs. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {().InstancesRotateServerCaRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -3980,7 +3913,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL read replica instance name. - * @param {string=} params.parent The parent resource where Cloud SQL starts this database instance replication. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project ID of the project that contains the read replica. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4056,7 +3988,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL read replica instance name. - * @param {string=} params.parent The parent resource where Cloud SQL stops this database instance replication. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project ID of the project that contains the read replica. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4132,7 +4063,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL truncates this log. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the Cloud SQL project. * @param {().InstancesTruncateLogRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -4203,14 +4133,13 @@ export namespace sql_v1beta4 { /** * sql.instances.update - * @desc Updates settings of a Cloud SQL instance. + * @desc Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. * @alias sql.instances.update * @memberOf! () * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the database instance for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance} * @param {().DatabaseInstance} params.requestBody 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. @@ -4288,10 +4217,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL should add this server CA. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -4307,10 +4232,6 @@ export namespace sql_v1beta4 { * The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL should clone this instance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the source as well as the clone Cloud SQL instance. */ @@ -4335,10 +4256,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance to be deleted. */ project?: string; - /** - * The name of database instance to delete. Format: projects/{project}/locations/{location}/instances/{instance} - */ - resourceName?: string; } export interface Params$Resource$Instances$Demotemaster extends StandardParameters { @@ -4351,10 +4268,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance name. */ instance?: string; - /** - * The parent resource where Cloud SQL demotes this master database instance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * ID of the project that contains the instance. */ @@ -4375,10 +4288,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL exports this database instance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance to be exported. */ @@ -4400,10 +4309,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL sends this database instance during a failover. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * ID of the project that contains the read replica. */ @@ -4428,10 +4333,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * Name of the resource database instance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - resourceName?: string; } export interface Params$Resource$Instances$Import extends StandardParameters { /** @@ -4443,10 +4344,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL imports this database instance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -4463,10 +4360,6 @@ export namespace sql_v1beta4 { */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - /** - * The parent resource where Cloud SQL creates this database instance. Format: projects/{project}/locations/{location} - */ - parent?: string; /** * Project ID of the project to which the newly created Cloud SQL instances should belong. */ @@ -4495,10 +4388,6 @@ export namespace sql_v1beta4 { * A previously-returned page token representing part of the larger set of results to view. */ pageToken?: string; - /** - * The parent, which owns this collection of database instances. Format: projects/{project}/locations/{location} - */ - parent?: string; /** * Project ID of the project for which to list Cloud SQL instances. */ @@ -4515,10 +4404,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent, which owns this collection of server CAs. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -4538,10 +4423,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the database instance for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance} - */ - resourceName?: string; /** * Request body metadata @@ -4559,10 +4440,6 @@ export namespace sql_v1beta4 { * Cloud SQL read replica instance name. */ instance?: string; - /** - * The parent resource where Cloud SQL promotes this replica database instance. Format: projects/{project}/locations/{location} - */ - parent?: string; /** * ID of the project that contains the read replica. */ @@ -4579,10 +4456,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL resets this SSL config. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -4599,10 +4472,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL restarts this database instance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance to be restarted. */ @@ -4619,10 +4488,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL restores this database instance from backup. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -4644,10 +4509,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL rotates these server CAs. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -4669,10 +4530,6 @@ export namespace sql_v1beta4 { * Cloud SQL read replica instance name. */ instance?: string; - /** - * The parent resource where Cloud SQL starts this database instance replication. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * ID of the project that contains the read replica. */ @@ -4689,10 +4546,6 @@ export namespace sql_v1beta4 { * Cloud SQL read replica instance name. */ instance?: string; - /** - * The parent resource where Cloud SQL stops this database instance replication. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * ID of the project that contains the read replica. */ @@ -4709,10 +4562,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL truncates this log. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the Cloud SQL project. */ @@ -4737,10 +4586,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the database instance for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance} - */ - resourceName?: string; /** * Request body metadata @@ -4763,7 +4608,6 @@ export namespace sql_v1beta4 { * @param {object} params Parameters for request * @param {string} params.operation Instance operation ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the operation for Cloud SQL to get. Format: projects/{project}/locations/{location}/operations/{operation} * @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 @@ -4838,7 +4682,6 @@ export namespace sql_v1beta4 { * @param {string=} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {integer=} params.maxResults Maximum number of operations per response. * @param {string=} params.pageToken A previously-returned page token representing part of the larger set of results to view. - * @param {string=} params.parent Indirect parent. The direct parent should combine with the instance name, which owns this collection of operations. Format: projects/{project}/locations/{location} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -4921,10 +4764,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the operation for Cloud SQL to get. Format: projects/{project}/locations/{location}/operations/{operation} - */ - resourceName?: string; } export interface Params$Resource$Operations$List extends StandardParameters { /** @@ -4944,10 +4783,6 @@ export namespace sql_v1beta4 { * A previously-returned page token representing part of the larger set of results to view. */ pageToken?: string; - /** - * Indirect parent. The direct parent should combine with the instance name, which owns this collection of operations. Format: projects/{project}/locations/{location} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -4957,11 +4792,9 @@ export namespace sql_v1beta4 { export class Resource$Projects { context: APIRequestContext; instances: Resource$Projects$Instances; - locations: Resource$Projects$Locations; constructor(context: APIRequestContext) { this.context = context; this.instances = new Resource$Projects$Instances(this.context); - this.locations = new Resource$Projects$Locations(this.context); } } @@ -4979,7 +4812,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL reshedule this database instance's maintenance. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project ID of the project that contains the instance. * @param {().SqlInstancesRescheduleMaintenanceRequestBody} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -5058,7 +4890,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL starts this database instance external sync. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project ID of the project that contains the first generation instance. * @param {string=} params.syncMode External sync mode * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -5135,7 +4966,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL verifies this database instance external sync settings. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {string=} params.syncMode External sync mode * @param {boolean=} params.verifyConnectionOnly Flag to enable verifying connection only @@ -5242,10 +5072,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL reshedule this database instance's maintenance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * ID of the project that contains the instance. */ @@ -5267,10 +5093,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL starts this database instance external sync. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * ID of the project that contains the first generation instance. */ @@ -5291,361 +5113,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL verifies this database instance external sync settings. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; - /** - * Project ID of the project that contains the instance. - */ - project?: string; - /** - * External sync mode - */ - syncMode?: string; - /** - * Flag to enable verifying connection only - */ - verifyConnectionOnly?: boolean; - } - - export class Resource$Projects$Locations { - context: APIRequestContext; - instances: Resource$Projects$Locations$Instances; - constructor(context: APIRequestContext) { - this.context = context; - this.instances = new Resource$Projects$Locations$Instances(this.context); - } - } - - export class Resource$Projects$Locations$Instances { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * sql.projects.locations.instances.rescheduleMaintenance - * @desc Reschedules the maintenance on the given instance. - * @alias sql.projects.locations.instances.rescheduleMaintenance - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string} params.parent The parent resource where Cloud SQL reshedule this database instance's maintenance. Format: projects/{project}/locations/{location}/instances/{instance} - * @param {string=} params.project ID of the project that contains the instance. - * @param {().SqlInstancesRescheduleMaintenanceRequestBody} params.requestBody 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 - */ - rescheduleMaintenance( - params?: Params$Resource$Projects$Locations$Instances$Reschedulemaintenance, - options?: MethodOptions - ): GaxiosPromise; - rescheduleMaintenance( - params: Params$Resource$Projects$Locations$Instances$Reschedulemaintenance, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - rescheduleMaintenance( - params: Params$Resource$Projects$Locations$Instances$Reschedulemaintenance, - callback: BodyResponseCallback - ): void; - rescheduleMaintenance( - callback: BodyResponseCallback - ): void; - rescheduleMaintenance( - paramsOrCallback?: - | Params$Resource$Projects$Locations$Instances$Reschedulemaintenance - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Instances$Reschedulemaintenance; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Instances$Reschedulemaintenance; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + '/sql/v1beta4/{+parent}/rescheduleMaintenance' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context: this.context, - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - /** - * sql.projects.locations.instances.startExternalSync - * @desc Start External master migration. - * @alias sql.projects.locations.instances.startExternalSync - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string} params.parent The parent resource where Cloud SQL starts this database instance external sync. Format: projects/{project}/locations/{location}/instances/{instance} - * @param {string=} params.project ID of the project that contains the first generation instance. - * @param {string=} params.syncMode External sync mode - * @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 - */ - startExternalSync( - params?: Params$Resource$Projects$Locations$Instances$Startexternalsync, - options?: MethodOptions - ): GaxiosPromise; - startExternalSync( - params: Params$Resource$Projects$Locations$Instances$Startexternalsync, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - startExternalSync( - params: Params$Resource$Projects$Locations$Instances$Startexternalsync, - callback: BodyResponseCallback - ): void; - startExternalSync(callback: BodyResponseCallback): void; - startExternalSync( - paramsOrCallback?: - | Params$Resource$Projects$Locations$Instances$Startexternalsync - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback, - callback?: BodyResponseCallback - ): void | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Instances$Startexternalsync; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Instances$Startexternalsync; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/sql/v1beta4/{+parent}/startExternalSync').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', - }, - options - ), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context: this.context, - }; - if (callback) { - createAPIRequest(parameters, callback); - } else { - return createAPIRequest(parameters); - } - } - - /** - * sql.projects.locations.instances.verifyExternalSyncSettings - * @desc Verify External master external sync settings. - * @alias sql.projects.locations.instances.verifyExternalSyncSettings - * @memberOf! () - * - * @param {object} params Parameters for request - * @param {string=} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string} params.parent The parent resource where Cloud SQL verifies this database instance external sync settings. Format: projects/{project}/locations/{location}/instances/{instance} - * @param {string=} params.project Project ID of the project that contains the instance. - * @param {string=} params.syncMode External sync mode - * @param {boolean=} params.verifyConnectionOnly Flag to enable verifying connection only - * @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 - */ - verifyExternalSyncSettings( - params?: Params$Resource$Projects$Locations$Instances$Verifyexternalsyncsettings, - options?: MethodOptions - ): GaxiosPromise; - verifyExternalSyncSettings( - params: Params$Resource$Projects$Locations$Instances$Verifyexternalsyncsettings, - options: - | MethodOptions - | BodyResponseCallback< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - >, - callback: BodyResponseCallback< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - > - ): void; - verifyExternalSyncSettings( - params: Params$Resource$Projects$Locations$Instances$Verifyexternalsyncsettings, - callback: BodyResponseCallback< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - > - ): void; - verifyExternalSyncSettings( - callback: BodyResponseCallback< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - > - ): void; - verifyExternalSyncSettings( - paramsOrCallback?: - | Params$Resource$Projects$Locations$Instances$Verifyexternalsyncsettings - | BodyResponseCallback< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - >, - optionsOrCallback?: - | MethodOptions - | BodyResponseCallback< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - >, - callback?: BodyResponseCallback< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - > - ): void | GaxiosPromise< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - > { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Instances$Verifyexternalsyncsettings; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Instances$Verifyexternalsyncsettings; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://sqladmin.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + '/sql/v1beta4/{+parent}/verifyExternalSyncSettings' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback - ); - } else { - return createAPIRequest< - Schema$SqlInstancesVerifyExternalSyncSettingsResponse - >(parameters); - } - } - } - - export interface Params$Resource$Projects$Locations$Instances$Reschedulemaintenance - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * The parent resource where Cloud SQL reshedule this database instance's maintenance. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; - /** - * ID of the project that contains the instance. - */ - project?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$SqlInstancesRescheduleMaintenanceRequestBody; - } - export interface Params$Resource$Projects$Locations$Instances$Startexternalsync - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * The parent resource where Cloud SQL starts this database instance external sync. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; - /** - * ID of the project that contains the first generation instance. - */ - project?: string; - /** - * External sync mode - */ - syncMode?: string; - } - export interface Params$Resource$Projects$Locations$Instances$Verifyexternalsyncsettings - extends StandardParameters { - /** - * Auth client or API Key for the request - */ - auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient; - - /** - * Cloud SQL instance ID. This does not include the project ID. - */ - instance?: string; - /** - * The parent resource where Cloud SQL verifies this database instance external sync settings. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -5674,7 +5141,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL creates this ephemeral certificate. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the Cloud SQL project. * @param {().SslCertsCreateEphemeralRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -5750,7 +5216,6 @@ export namespace sql_v1beta4 { * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of SSL certificate to delete. Format: projects/{project}/locations/{location}/instances/{instance}/sslCerts/{sslCert} * @param {string} params.sha1Fingerprint Sha1 FingerPrint. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -5826,7 +5291,6 @@ export namespace sql_v1beta4 { * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName Name of the resource ssl certificate. Format: projects/{project}/locations/{location}/instances/{instance}/sslCerts/{sslCert} * @param {string} params.sha1Fingerprint Sha1 FingerPrint. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -5899,7 +5363,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL creates this SSL certificate. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {().SslCertsInsertRequest} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -5977,7 +5440,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Cloud SQL instance ID. This does not include the project ID. - * @param {string=} params.parent The parent, which owns this collection of SSL certificates. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -6058,10 +5520,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL creates this ephemeral certificate. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the Cloud SQL project. */ @@ -6086,10 +5544,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of SSL certificate to delete. Format: projects/{project}/locations/{location}/instances/{instance}/sslCerts/{sslCert} - */ - resourceName?: string; /** * Sha1 FingerPrint. */ @@ -6109,10 +5563,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * Name of the resource ssl certificate. Format: projects/{project}/locations/{location}/instances/{instance}/sslCerts/{sslCert} - */ - resourceName?: string; /** * Sha1 FingerPrint. */ @@ -6128,10 +5578,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL creates this SSL certificate. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -6152,10 +5598,6 @@ export namespace sql_v1beta4 { * Cloud SQL instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent, which owns this collection of SSL certificates. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -6271,7 +5713,6 @@ export namespace sql_v1beta4 { * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string=} params.name Name of the user in the instance. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the user to delete. Format: projects/{project}/locations/{location}/instances/{instance}/users * @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 @@ -6345,7 +5786,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Database instance ID. This does not include the project ID. - * @param {string=} params.parent The parent resource where Cloud SQL creates this user. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {().User} params.requestBody Request body data * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. @@ -6421,7 +5861,6 @@ export namespace sql_v1beta4 { * * @param {object} params Parameters for request * @param {string} params.instance Database instance ID. This does not include the project ID. - * @param {string=} params.parent The parent, which owns this collection of users. Format: projects/{project}/locations/{location}/instances/{instance} * @param {string} params.project Project ID of the project that contains the instance. * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`. * @param {callback} callback The callback that handles the response. @@ -6499,7 +5938,6 @@ export namespace sql_v1beta4 { * @param {string} params.instance Database instance ID. This does not include the project ID. * @param {string=} params.name Name of the user in the instance. * @param {string} params.project Project ID of the project that contains the instance. - * @param {string=} params.resourceName The name of the user for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance}/users * @param {().User} params.requestBody 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. @@ -6589,10 +6027,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the user to delete. Format: projects/{project}/locations/{location}/instances/{instance}/users - */ - resourceName?: string; } export interface Params$Resource$Users$Insert extends StandardParameters { /** @@ -6604,10 +6038,6 @@ export namespace sql_v1beta4 { * Database instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent resource where Cloud SQL creates this user. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -6628,10 +6058,6 @@ export namespace sql_v1beta4 { * Database instance ID. This does not include the project ID. */ instance?: string; - /** - * The parent, which owns this collection of users. Format: projects/{project}/locations/{location}/instances/{instance} - */ - parent?: string; /** * Project ID of the project that contains the instance. */ @@ -6659,10 +6085,6 @@ export namespace sql_v1beta4 { * Project ID of the project that contains the instance. */ project?: string; - /** - * The name of the user for Cloud SQL to update. Format: projects/{project}/locations/{location}/instances/{instance}/users - */ - resourceName?: string; /** * Request body metadata diff --git a/src/apis/testing/v1.ts b/src/apis/testing/v1.ts index e06278ed6f..6e4b6edd1a 100644 --- a/src/apis/testing/v1.ts +++ b/src/apis/testing/v1.ts @@ -301,6 +301,10 @@ export namespace testing_v1 { * Tags for this dimension. Examples: "default", "preview", "deprecated". */ tags?: string[] | null; + /** + * URL of a thumbnail image of the device. + */ + thumbnailUrl?: string | null; } /** * A test of an android application that explores the application on a virtual or physical Android Device, finding culprits and crashes as it goes. @@ -689,7 +693,7 @@ export namespace testing_v1 { iosDevices?: Schema$IosDevice[]; } /** - * A description of an iOS device tests may be run on. Next tag: 11 + * A description of an iOS device tests may be run on. Next tag: 12 */ export interface Schema$IosModel { /** diff --git a/src/apis/toolresults/README.md b/src/apis/toolresults/README.md index 4e702d0040..f7b53cffff 100644 --- a/src/apis/toolresults/README.md +++ b/src/apis/toolresults/README.md @@ -2,7 +2,7 @@ # toolresults -> API to publish and access results from developer tools. +> Reads and publishes results from Firebase Test Lab. ## Installation diff --git a/src/apis/toolresults/index.ts b/src/apis/toolresults/index.ts index 70640d2976..99b7036c5e 100644 --- a/src/apis/toolresults/index.ts +++ b/src/apis/toolresults/index.ts @@ -14,33 +14,21 @@ /*! THIS FILE IS AUTO-GENERATED */ import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; -import {toolresults_v1} from './v1'; import {toolresults_v1beta3} from './v1beta3'; export const VERSIONS = { - v1: toolresults_v1.Toolresults, v1beta3: toolresults_v1beta3.Toolresults, }; -export function toolresults(version: 'v1'): toolresults_v1.Toolresults; -export function toolresults( - options: toolresults_v1.Options -): toolresults_v1.Toolresults; export function toolresults( version: 'v1beta3' ): toolresults_v1beta3.Toolresults; export function toolresults( options: toolresults_v1beta3.Options ): toolresults_v1beta3.Toolresults; -export function toolresults< - T = toolresults_v1.Toolresults | toolresults_v1beta3.Toolresults ->( +export function toolresults( this: GoogleConfigurable, - versionOrOptions: - | 'v1' - | toolresults_v1.Options - | 'v1beta3' - | toolresults_v1beta3.Options + versionOrOptions: 'v1beta3' | toolresults_v1beta3.Options ) { return getAPI('toolresults', versionOrOptions, VERSIONS, this); } diff --git a/src/apis/toolresults/v1.ts b/src/apis/toolresults/v1.ts deleted file mode 100644 index 280449dae6..0000000000 --- a/src/apis/toolresults/v1.ts +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright 2019 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. - -import { - OAuth2Client, - JWT, - Compute, - UserRefreshClient, -} from 'google-auth-library'; -import { - GoogleConfigurable, - createAPIRequest, - MethodOptions, - GlobalOptions, - BodyResponseCallback, - APIRequestContext, -} from 'googleapis-common'; -import {GaxiosPromise} from 'gaxios'; - -// tslint:disable: no-any -// tslint:disable: class-name -// tslint:disable: variable-name -// tslint:disable: jsdoc-format -// tslint:disable: no-namespace - -export namespace toolresults_v1 { - export interface Options extends GlobalOptions { - version: 'v1'; - } - - interface StandardParameters { - /** - * V1 error format. - */ - '$.xgafv'?: string; - /** - * OAuth access token. - */ - access_token?: string; - /** - * Data format for response. - */ - alt?: string; - /** - * JSONP - */ - callback?: string; - /** - * Selector specifying which fields to include in a partial response. - */ - fields?: string; - /** - * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. - */ - key?: string; - /** - * OAuth 2.0 token for the current user. - */ - oauth_token?: string; - /** - * Returns response with indentations and line breaks. - */ - prettyPrint?: boolean; - /** - * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. - */ - quotaUser?: string; - /** - * Legacy upload protocol for media (e.g. "media", "multipart"). - */ - uploadType?: string; - /** - * Upload protocol for media (e.g. "raw", "multipart"). - */ - upload_protocol?: string; - } - - /** - * Cloud Tool Results API - * - * API to publish and access results from developer tools. - * - * @example - * const {google} = require('googleapis'); - * const toolresults = google.toolresults('v1'); - * - * @namespace toolresults - * @type {Function} - * @version v1 - * @variation v1 - * @param {object=} options Options for Toolresults - */ - export class Toolresults { - context: APIRequestContext; - - constructor(options: GlobalOptions, google?: GoogleConfigurable) { - this.context = { - _options: options || {}, - google, - }; - } - } - - /** - * Additional details for an ANR crash. - */ - export interface Schema$ANR { - /** - * The stack trace of the ANR crash. Optional. - */ - stackTrace?: Schema$StackTrace; - } - /** - * A suggestion to use deep links for a Robo run. - */ - export interface Schema$AvailableDeepLinks {} - /** - * A warning that Robo encountered a screen that was mostly blank; this may indicate a problem with the app. - */ - export interface Schema$BlankScreen { - /** - * The screen id of the element - */ - screenId?: string | null; - } - /** - * Crash dialog was detected during the test execution - */ - export interface Schema$CrashDialogError { - /** - * The name of the package that caused the dialog. - */ - crashPackage?: string | null; - } - /** - * Additional details about encountered login screens. - */ - export interface Schema$EncounteredLoginScreen { - /** - * Number of encountered distinct login screens. - */ - distinctScreens?: number | null; - /** - * Subset of login screens. - */ - screenIds?: string[] | null; - } - /** - * Additional details about encountered screens with elements that are not Android UI widgets. - */ - export interface Schema$EncounteredNonAndroidUiWidgetScreen { - /** - * Number of encountered distinct screens with non Android UI widgets. - */ - distinctScreens?: number | null; - /** - * Subset of screens which contain non Android UI widgets. - */ - screenIds?: string[] | null; - } - /** - * Failed to install the APK. - */ - export interface Schema$FailedToInstall {} - /** - * Additional details for a fatal exception. - */ - export interface Schema$FatalException { - /** - * The stack trace of the fatal exception. Optional. - */ - stackTrace?: Schema$StackTrace; - } - /** - * Additional details of in-app purchases encountered during the crawl. - */ - export interface Schema$InAppPurchasesFound { - /** - * The total number of in-app purchases flows explored: how many times the robo tries to buy a SKU. - */ - inAppPurchasesFlowsExplored?: number | null; - /** - * The total number of in-app purchases flows started. - */ - inAppPurchasesFlowsStarted?: number | null; - } - /** - * A warning that Robo did not crawl potentially important parts of the app. - */ - export interface Schema$InsufficientCoverage {} - /** - * Additional details for an iOS app crash. - */ - export interface Schema$IosAppCrashed { - /** - * The stack trace, if one is available. Optional. - */ - stackTrace?: Schema$StackTrace; - } - /** - * Failed to find the launcher activity of an app. - */ - export interface Schema$LauncherActivityNotFound {} - /** - * Additional details for a native crash. - */ - export interface Schema$NativeCrash { - /** - * The stack trace of the native crash. Optional. - */ - stackTrace?: Schema$StackTrace; - } - /** - * A non-sdk API and examples of it being called along with other metadata See https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces - */ - export interface Schema$NonSdkApi { - /** - * The signature of the Non-SDK API - */ - apiSignature?: string | null; - /** - * Example stack traces of this API being called. - */ - exampleStackTraces?: string[] | null; - /** - * Optional debugging insights for non-SDK API violations. - */ - insights?: Schema$NonSdkApiInsight[]; - /** - * The total number of times this API was observed to have been called. - */ - invocationCount?: number | null; - /** - * Which list this API appears on - */ - list?: string | null; - } - /** - * Non-SDK API insights (to address debugging solutions). - */ - export interface Schema$NonSdkApiInsight { - /** - * Optional sample stack traces, for which this insight applies (there should be at least one). - */ - exampleTraceMessages?: string[] | null; - /** - * A unique ID, to be used for determining the effectiveness of this particular insight in the context of a matcher. (required) - */ - matcherId?: string | null; - /** - * An insight indicating that the hidden API usage originates from a Google-provided library. - */ - pendingGoogleUpdateInsight?: Schema$PendingGoogleUpdateInsight; - /** - * An insight indicating that the hidden API usage originates from the use of a library that needs to be upgraded. - */ - upgradeInsight?: Schema$UpgradeInsight; - } - /** - * Additional details for a non-sdk API usage violation. - */ - export interface Schema$NonSdkApiUsageViolation { - /** - * Signatures of a subset of those hidden API's. - */ - apiSignatures?: string[] | null; - /** - * Total number of unique hidden API's accessed. - */ - uniqueApis?: number | null; - } - /** - * Contains a summary and examples of non-sdk API usage violations. - */ - export interface Schema$NonSdkApiUsageViolationReport { - /** - * Examples of the detected API usages. - */ - exampleApis?: Schema$NonSdkApi[]; - /** - * Minimum API level required for the application to run. - */ - minSdkVersion?: number | null; - /** - * Specifies the API Level on which the application is designed to run. - */ - targetSdkVersion?: number | null; - /** - * Total number of unique Non-SDK API's accessed. - */ - uniqueApis?: number | null; - } - /** - * A warning that Robo encountered a screen that has overlapping clickable elements; this may indicate a potential UI issue. - */ - export interface Schema$OverlappingUIElements { - /** - * Resource names of the overlapping screen elements - */ - resourceName?: string[] | null; - /** - * The screen id of the elements - */ - screenId?: string | null; - } - /** - * This insight indicates that the hidden API usage originates from a Google-provided library. Users need not take any action. - */ - export interface Schema$PendingGoogleUpdateInsight { - /** - * The name of the Google-provided library with the non-SDK API dependency. - */ - nameOfGoogleLibrary?: string | null; - } - /** - * A notification that Robo signed in with Google. - */ - export interface Schema$PerformedGoogleLogin {} - /** - * A notification that Robo performed some monkey actions. - */ - export interface Schema$PerformedMonkeyActions { - /** - * The total number of monkey actions performed during the crawl. - */ - totalActions?: number | null; - } - /** - * Execution stats for a user-provided Robo script. - */ - export interface Schema$RoboScriptExecution { - /** - * The number of Robo script actions executed successfully. - */ - successfulActions?: number | null; - /** - * The total number of actions in the Robo script. - */ - totalActions?: number | null; - } - /** - * A stacktrace. - */ - export interface Schema$StackTrace { - /** - * The stack trace message. Required - */ - exception?: string | null; - } - /** - * User provided intent failed to resolve to an activity. - */ - export interface Schema$StartActivityNotFound { - action?: string | null; - uri?: string | null; - } - /** - * A warning that the screen hierarchy is deeper than the recommended threshold. - */ - export interface Schema$UIElementTooDeep { - /** - * The depth of the screen element - */ - depth?: number | null; - /** - * The screen id of the element - */ - screenId?: string | null; - /** - * The screen state id of the element - */ - screenStateId?: string | null; - } - /** - * Default unspecified warning. - */ - export interface Schema$UnspecifiedWarning {} - /** - * Additional details of an unused robodirective. - */ - export interface Schema$UnusedRoboDirective { - /** - * The name of the resource that was unused. - */ - resourceName?: string | null; - } - /** - * This insight is a recommendation to upgrade a given library to the specified version, in order to avoid dependencies on non-SDK APIs. - */ - export interface Schema$UpgradeInsight { - /** - * The name of the package to be upgraded. - */ - packageName?: string | null; - /** - * The suggested version to upgrade to. Optional: In case we are not sure which version solves this problem - */ - upgradeToVersion?: string | null; - } - /** - * Additional details of a used Robo directive. - */ - export interface Schema$UsedRoboDirective { - /** - * The name of the resource that was used. - */ - resourceName?: string | null; - } - /** - * Additional details of a used Robo directive with an ignore action. Note: This is a different scenario than unused directive. - */ - export interface Schema$UsedRoboIgnoreDirective { - /** - * The name of the resource that was ignored. - */ - resourceName?: string | null; - } -} diff --git a/src/apis/videointelligence/v1.ts b/src/apis/videointelligence/v1.ts index 6a090315aa..4611d27713 100644 --- a/src/apis/videointelligence/v1.ts +++ b/src/apis/videointelligence/v1.ts @@ -386,7 +386,7 @@ export namespace videointelligence_v1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -423,7 +423,7 @@ export namespace videointelligence_v1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -768,7 +768,7 @@ export namespace videointelligence_v1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -805,7 +805,7 @@ export namespace videointelligence_v1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1150,7 +1150,7 @@ export namespace videointelligence_v1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1187,7 +1187,7 @@ export namespace videointelligence_v1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1614,7 +1614,7 @@ export namespace videointelligence_v1 { */ annotationResults?: Schema$GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults; /** - * GCS URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id + * Cloud Storage URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id */ annotationResultsUri?: string | null; /** @@ -1737,7 +1737,7 @@ export namespace videointelligence_v1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1782,7 +1782,7 @@ export namespace videointelligence_v1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1890,7 +1890,7 @@ export namespace videointelligence_v1 { */ inputContent?: string | null; /** - * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. + * Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. */ inputUri?: string | null; /** @@ -1898,7 +1898,7 @@ export namespace videointelligence_v1 { */ locationId?: string | null; /** - * Optional. Location where the output (in JSON format) should be stored. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). + * Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). */ outputUri?: string | null; /** @@ -2279,7 +2279,7 @@ export namespace videointelligence_v1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2316,7 +2316,7 @@ export namespace videointelligence_v1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** diff --git a/src/apis/videointelligence/v1beta2.ts b/src/apis/videointelligence/v1beta2.ts index 7b6f63fdef..8f51a2953e 100644 --- a/src/apis/videointelligence/v1beta2.ts +++ b/src/apis/videointelligence/v1beta2.ts @@ -137,7 +137,7 @@ export namespace videointelligence_v1beta2 { */ inputContent?: string | null; /** - * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. + * Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. */ inputUri?: string | null; /** @@ -145,7 +145,7 @@ export namespace videointelligence_v1beta2 { */ locationId?: string | null; /** - * Optional. Location where the output (in JSON format) should be stored. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). + * Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). */ outputUri?: string | null; /** @@ -526,7 +526,7 @@ export namespace videointelligence_v1beta2 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -563,7 +563,7 @@ export namespace videointelligence_v1beta2 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -941,7 +941,7 @@ export namespace videointelligence_v1beta2 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -978,7 +978,7 @@ export namespace videointelligence_v1beta2 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1323,7 +1323,7 @@ export namespace videointelligence_v1beta2 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1360,7 +1360,7 @@ export namespace videointelligence_v1beta2 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1787,7 +1787,7 @@ export namespace videointelligence_v1beta2 { */ annotationResults?: Schema$GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults; /** - * GCS URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id + * Cloud Storage URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id */ annotationResultsUri?: string | null; /** @@ -1910,7 +1910,7 @@ export namespace videointelligence_v1beta2 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1955,7 +1955,7 @@ export namespace videointelligence_v1beta2 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2308,7 +2308,7 @@ export namespace videointelligence_v1beta2 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2345,7 +2345,7 @@ export namespace videointelligence_v1beta2 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** diff --git a/src/apis/videointelligence/v1p1beta1.ts b/src/apis/videointelligence/v1p1beta1.ts index b9dbbc6905..7fd87f4b60 100644 --- a/src/apis/videointelligence/v1p1beta1.ts +++ b/src/apis/videointelligence/v1p1beta1.ts @@ -382,7 +382,7 @@ export namespace videointelligence_v1p1beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -419,7 +419,7 @@ export namespace videointelligence_v1p1beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -519,7 +519,7 @@ export namespace videointelligence_v1p1beta1 { */ inputContent?: string | null; /** - * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. + * Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. */ inputUri?: string | null; /** @@ -527,7 +527,7 @@ export namespace videointelligence_v1p1beta1 { */ locationId?: string | null; /** - * Optional. Location where the output (in JSON format) should be stored. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). + * Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). */ outputUri?: string | null; /** @@ -908,7 +908,7 @@ export namespace videointelligence_v1p1beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -945,7 +945,7 @@ export namespace videointelligence_v1p1beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1323,7 +1323,7 @@ export namespace videointelligence_v1p1beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1360,7 +1360,7 @@ export namespace videointelligence_v1p1beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1787,7 +1787,7 @@ export namespace videointelligence_v1p1beta1 { */ annotationResults?: Schema$GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults; /** - * GCS URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id + * Cloud Storage URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id */ annotationResultsUri?: string | null; /** @@ -1910,7 +1910,7 @@ export namespace videointelligence_v1p1beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1955,7 +1955,7 @@ export namespace videointelligence_v1p1beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2308,7 +2308,7 @@ export namespace videointelligence_v1p1beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2345,7 +2345,7 @@ export namespace videointelligence_v1p1beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** diff --git a/src/apis/videointelligence/v1p2beta1.ts b/src/apis/videointelligence/v1p2beta1.ts index a86f0dcc8d..105436fff5 100644 --- a/src/apis/videointelligence/v1p2beta1.ts +++ b/src/apis/videointelligence/v1p2beta1.ts @@ -382,7 +382,7 @@ export namespace videointelligence_v1p2beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -419,7 +419,7 @@ export namespace videointelligence_v1p2beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -764,7 +764,7 @@ export namespace videointelligence_v1p2beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -801,7 +801,7 @@ export namespace videointelligence_v1p2beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -901,7 +901,7 @@ export namespace videointelligence_v1p2beta1 { */ inputContent?: string | null; /** - * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. + * Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. */ inputUri?: string | null; /** @@ -909,7 +909,7 @@ export namespace videointelligence_v1p2beta1 { */ locationId?: string | null; /** - * Optional. Location where the output (in JSON format) should be stored. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). + * Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). */ outputUri?: string | null; /** @@ -1290,7 +1290,7 @@ export namespace videointelligence_v1p2beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1327,7 +1327,7 @@ export namespace videointelligence_v1p2beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1787,7 +1787,7 @@ export namespace videointelligence_v1p2beta1 { */ annotationResults?: Schema$GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults; /** - * GCS URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id + * Cloud Storage URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id */ annotationResultsUri?: string | null; /** @@ -1910,7 +1910,7 @@ export namespace videointelligence_v1p2beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1955,7 +1955,7 @@ export namespace videointelligence_v1p2beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2308,7 +2308,7 @@ export namespace videointelligence_v1p2beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2345,7 +2345,7 @@ export namespace videointelligence_v1p2beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** diff --git a/src/apis/videointelligence/v1p3beta1.ts b/src/apis/videointelligence/v1p3beta1.ts index 9340547dd3..6baf66783d 100644 --- a/src/apis/videointelligence/v1p3beta1.ts +++ b/src/apis/videointelligence/v1p3beta1.ts @@ -382,7 +382,7 @@ export namespace videointelligence_v1p3beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -419,7 +419,7 @@ export namespace videointelligence_v1p3beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1beta2_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -764,7 +764,7 @@ export namespace videointelligence_v1p3beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -801,7 +801,7 @@ export namespace videointelligence_v1p3beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1146,7 +1146,7 @@ export namespace videointelligence_v1p3beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1183,7 +1183,7 @@ export namespace videointelligence_v1p3beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1283,7 +1283,7 @@ export namespace videointelligence_v1p3beta1 { */ inputContent?: string | null; /** - * Input video location. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. + * Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). A video URI may include wildcards in `object-id`, and thus identify multiple videos. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` should be unset. */ inputUri?: string | null; /** @@ -1291,7 +1291,7 @@ export namespace videointelligence_v1p3beta1 { */ locationId?: string | null; /** - * Optional. Location where the output (in JSON format) should be stored. Currently, only [Google Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). + * Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported, which must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](/storage/docs/reference-uris). */ outputUri?: string | null; /** @@ -1775,7 +1775,7 @@ export namespace videointelligence_v1p3beta1 { */ annotationResults?: Schema$GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults; /** - * GCS URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id + * Cloud Storage URI that stores annotation results of one streaming session. It is a directory that can hold multiple files in JSON format. Example uri format: gs://bucket_id/object_id/cloud_project_name-session_id */ annotationResultsUri?: string | null; /** @@ -1911,7 +1911,7 @@ export namespace videointelligence_v1p3beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -1956,7 +1956,7 @@ export namespace videointelligence_v1p3beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2350,7 +2350,7 @@ export namespace videointelligence_v1p3beta1 { */ feature?: string | null; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** @@ -2387,7 +2387,7 @@ export namespace videointelligence_v1p3beta1 { */ frameLabelAnnotations?: Schema$GoogleCloudVideointelligenceV1_LabelAnnotation[]; /** - * Video file location in [Google Cloud Storage](https://cloud.google.com/storage/). + * Video file location in [Cloud Storage](https://cloud.google.com/storage/). */ inputUri?: string | null; /** diff --git a/src/index.ts b/src/index.ts index 76c25579e3..65e6d092fe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -129,6 +129,7 @@ export {dialogflow_v2} from './apis/dialogflow/v2'; export {dialogflow_v2beta1} from './apis/dialogflow/v2beta1'; export {digitalassetlinks_v1} from './apis/digitalassetlinks/v1'; export {discovery_v1} from './apis/discovery/v1'; +export {displayvideo_v1} from './apis/displayvideo/v1'; export {dlp_v2} from './apis/dlp/v2'; export {dns_v1} from './apis/dns/v1'; export {dns_v1beta2} from './apis/dns/v1beta2'; @@ -154,6 +155,7 @@ export {firestore_v1beta1} from './apis/firestore/v1beta1'; export {firestore_v1beta2} from './apis/firestore/v1beta2'; export {fitness_v1} from './apis/fitness/v1'; export {games_v1} from './apis/games/v1'; +export {gamesConfiguration_v1configuration} from './apis/gamesConfiguration/v1configuration'; export {gamesManagement_v1management} from './apis/gamesManagement/v1management'; export {genomics_v1} from './apis/genomics/v1'; export {genomics_v1alpha2} from './apis/genomics/v1alpha2'; @@ -180,11 +182,15 @@ export {libraryagent_v1} from './apis/libraryagent/v1'; export {licensing_v1} from './apis/licensing/v1'; export {lifesciences_v2beta} from './apis/lifesciences/v2beta'; export {logging_v2} from './apis/logging/v2'; +export {managedidentities_v1} from './apis/managedidentities/v1'; +export {managedidentities_v1alpha1} from './apis/managedidentities/v1alpha1'; +export {managedidentities_v1beta1} from './apis/managedidentities/v1beta1'; export {manufacturers_v1} from './apis/manufacturers/v1'; export {mirror_v1} from './apis/mirror/v1'; export {ml_v1} from './apis/ml/v1'; export {monitoring_v1} from './apis/monitoring/v1'; export {monitoring_v3} from './apis/monitoring/v3'; +export {networkmanagement_v1beta1} from './apis/networkmanagement/v1beta1'; export {oauth2_v1} from './apis/oauth2/v1'; export {oauth2_v2} from './apis/oauth2/v2'; export {osconfig_v1beta} from './apis/osconfig/v1beta'; @@ -254,7 +260,6 @@ export {tasks_v1} from './apis/tasks/v1'; export {testing_v1} from './apis/testing/v1'; export {texttospeech_v1} from './apis/texttospeech/v1'; export {texttospeech_v1beta1} from './apis/texttospeech/v1beta1'; -export {toolresults_v1} from './apis/toolresults/v1'; export {toolresults_v1beta3} from './apis/toolresults/v1beta3'; export {tpu_v1} from './apis/tpu/v1'; export {tpu_v1alpha1} from './apis/tpu/v1alpha1';